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 ppperry
Recipients Winterflower, matrixise, ppperry, rhettinger, terry.reedy
Date 2016-05-19.19:09:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463684977.52.0.506376563289.issue25548@psf.upfronthosting.co.za>
In-reply-to
Content
I don't quite get why the memory address is helpful, but you could work around this using a custom metaclass:

    class IdMeta(type):
        def __repr__(cls):
            return super().__repr__()[:-1] + " at 0x%x>"%id(cls)
    class IdInRepr(metaclass=IdMeta):pass

`IdInRepr` and all its subclasses will then have the memory address in their representation:

  <class 'module.name' at address>
History
Date User Action Args
2016-05-19 19:09:37ppperrysetrecipients: + ppperry, rhettinger, terry.reedy, matrixise, Winterflower
2016-05-19 19:09:37ppperrysetmessageid: <1463684977.52.0.506376563289.issue25548@psf.upfronthosting.co.za>
2016-05-19 19:09:37ppperrylinkissue25548 messages
2016-05-19 19:09:37ppperrycreate