Message229010
Yes, the 'huh' function would have to be in either AutoEnum or AddressSegment to be included in the dir of an AddressSegment member.
Here's a shorter example:
(this works)
----------------------------------------------------
class SuperEnum(Enum):
pass
class SubEnum(SuperEnum):
sample = 5
def visible(self):
return "saw me, right?"
'visible' in dir(SubEnum.sample)
----------------------------------------------------
(this does not work)
----------------------------------------------------
class SuperEnum(Enum):
def invisible(self):
return "but you didn't see me!"
class SubEnum(SuperEnum):
sample = 5
'invisible' in dir(SubEnum.sample)
----------------------------------------------------
Sorry for the noise.
Do please note that the dir where 'visible' showed up was on the Enum member, not the Enum class. |
|
Date |
User |
Action |
Args |
2014-10-10 15:18:53 | ethan.furman | set | recipients:
+ ethan.furman, cool-RR |
2014-10-10 15:18:53 | ethan.furman | set | messageid: <1412954333.36.0.794527492891.issue22506@psf.upfronthosting.co.za> |
2014-10-10 15:18:53 | ethan.furman | link | issue22506 messages |
2014-10-10 15:18:53 | ethan.furman | create | |
|