On 4/27/2016 8:52 PM, Ethan Furman wrote:

The point Ben was trying to make is this: you should never* call __dunder__ methods in normal code; there is no need to do so:

- use len(), not __len__()
- use next(), not __next__()
- use some_instance.an_attribute, not some_instance.__dict__['an_attribute']


DOH! I need a doughnut. :)

Thank you,

Chris R.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to