eclipse-paho / eclipse-paho/paho.mqtt.python
ReasonCode.names is missing a ReasonCode.packet_name
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 742
- Avg merge
- 12d 48m
- Merged PRs (30d)
- 1
Description
While reading the docs about `ReasonCode.names` at https://eclipse.dev/paho/files/paho.mqtt.python/html/types.html#paho.mqtt.reasoncodes.ReasonCode
I was wondering why the `packet_name` useful to know where things come from is not listed. The only way I found was using https://github.com/eclipse/paho.mqtt.python/blob/master/src/paho/mqtt/reasoncodes.py#L190 (`__repr__()`) as `getName()` returns the name only.
Using that function gives me `ReasonCode(Disconnect, 'Unspecified error')` which is better than nothing.
I also would be happy if `getName()` would return an array where 0 is the name and 1 is the packet_name or another way I can get the packet_name.
Contributor guide
Assessment
This issue has not been assessed yet.