Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 430 Bytes

7319.feature.rst

File metadata and controls

12 lines (9 loc) · 430 Bytes

Changed WSMessage to a tagged union of NamedTuple -- by :user:`Dreamsorcerer`.

This change allows type checkers to know the precise type of data after checking the type attribute.

If accessing messages by tuple indexes, the order has now changed. Code such as: typ, data, extra = ws_message will need to be changed to: data, extra, typ = ws_message

No changes are needed if accessing by attribute name.