This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients cool-RR, ethan.furman
Date 2014-10-10.15:18:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412954333.36.0.794527492891.issue22506@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-10-10 15:18:53ethan.furmansetrecipients: + ethan.furman, cool-RR
2014-10-10 15:18:53ethan.furmansetmessageid: <1412954333.36.0.794527492891.issue22506@psf.upfronthosting.co.za>
2014-10-10 15:18:53ethan.furmanlinkissue22506 messages
2014-10-10 15:18:53ethan.furmancreate