[Python-Dev] One-line abstractmethod function?
Alexander Belopolsky
alexander.belopolsky at gmail.com
Thu Dec 5 22:19:26 CET 2013
More information about the Python-Dev mailing list
Thu Dec 5 22:19:26 CET 2013
- Previous message: [Python-Dev] One-line abstractmethod function?
- Next message: [Python-Dev] One-line abstractmethod function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Dec 5, 2013 at 3:06 PM, Brett Cannon <brett at python.org> wrote: > How will abstractmethod know its function has no body? >> > > Technically you could inspect the code object of the method. to figure out > if the body is empty. > One way if to check f.__code__.co_lnotab - it will be empty when f has no body. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20131205/6628ee65/attachment.html>
- Previous message: [Python-Dev] One-line abstractmethod function?
- Next message: [Python-Dev] One-line abstractmethod function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list