Markus Wegmann <> added the comment:

Hi Ethan

> Your Enum example in flawless is not an IntEnum, so the error (unable to add 
> an integer to None) seems entirely unrelated.

The TypeError is just a consequence of the faulty Enum identity comparison some 
lines before. I mentioned the TypeError so you can verify whether your Python 
version takes the same program flow.

I also did further research. The Enum's are definitely different regarding the 
module path -- the instance comparison will therefore return False. I checked 
__module__ + __qualname__:




The cause is the wrong import statement in `flora_tools/codegen/`:

`from radio_configuration import RadioConfiguration,\ 

It should have been

`from flora_tools.radio_configuration import RadioConfiguration\

The real deal here is why I was allowed to directly import from 
`radio_configuration` in the first place. I'm not allowed to directly import a 
submodule in the toy project without the proper root module name appended. 
Maybe I don't see the big picture, or have some crude options/monkey_patching 

Nevertheless, the behaviour regarding Enum comparisons and different import 
paths seems to me quite misleading.

Best regards


Python tracker <>
Python-bugs-list mailing list

Reply via email to