Re: Are ABCs an anti-pattern?

2012-10-06 Thread Demian Brecht
On 12-10-05 12:58 PM, Trent Nelson wrote: I like them. In particular, I like that I can enumerate all the subclasses that happen to implement the ABC via the metaclass's __subclasses__() method. As long as you have a common base class (which in your case is a requirement), then __subclasses__ w

Re: Are ABCs an anti-pattern?

2012-10-05 Thread Trent Nelson
On Tue, Oct 02, 2012 at 07:23:05AM -0700, Demian Brecht wrote: > I don't use them anymore, but I'm curious about others opinions on this > list... I like them. In particular, I like that I can enumerate all the subclasses that happen to implement the ABC via the metaclass's __subclas

Re: Are ABCs an anti-pattern?

2012-10-03 Thread Demian Brecht
> > > ABCs were added (fairly recently) in 3.0 for the reasons given in > http://python.org/dev/peps/**pep-3119/ > It was expected that it would take awhile for them to see good, pythonic > uses. We obviously did okay without them up to 2.7. > I read the PEP b

Re: Are ABCs an anti-pattern?

2012-10-02 Thread Terry Reedy
On 10/2/2012 10:23 AM, Demian Brecht wrote: I don't use them anymore, but I'm curious about others opinions on this list... The more time I spend in Python, discovering what "Pythonic" code is and such, it seems that I throw away much in terms of academic learnings as far as "OOP correctness" go

Re: Are ABCs an anti-pattern?

2012-10-02 Thread Mark Adam
On Tue, Oct 2, 2012 at 9:23 AM, Demian Brecht wrote: > I don't use them anymore, but I'm curious about others opinions on this > list... > Interesting question. I think they haven't been useful for representing the real world as everyone hoped, but are pretty good for organizing structures withi

Are ABCs an anti-pattern?

2012-10-02 Thread Demian Brecht
I don't use them anymore, but I'm curious about others opinions on this list... The more time I spend in Python, discovering what "Pythonic" code is and such, it seems that I throw away much in terms of academic learnings as far as "OOP correctness" goes. In doing so, I find that, in general,