[Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support) (original) (raw)
Łukasz Langa lukasz at langa.pl
Fri May 31 01:51:50 CEST 2013
- Previous message: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)
- Next message: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 31 maj 2013, at 01:47, Łukasz Langa <lukasz at langa.pl> wrote:
class State: def init(self): self.add.register(int, self.addint)
Ouch, I realized this is wrong just after I hit "Send". self.add is a staticmethod so this registration will overload on every instance. Which is obviously bad.
Lesson learned: don't post code at 2 AM.
-- Best regards, Łukasz Langa
WWW: http://lukasz.langa.pl/ Twitter: @llanga IRC: ambv on #python-dev
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130531/ae1f11fc/attachment.html>
- Previous message: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)
- Next message: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]