Proposed new syntax

Stephan Houben stephanh42 at gmail.com.invalid
Tue Aug 22 11:12:39 EDT 2017


Op 2017-08-22, Ian Kelly schreef <ian.g.kelly at gmail.com>:
> Careful! Python's dunder methods are reserved for use by Python.
> They're exposed so that we can override them. Calling them directly is
> generally considered bad style. And in this case specifically, it's
> not equivalent. 

Mmm, you are correct. That's kind of a deception, really.

I have often done things like:

  generate_id = itertools.count().__next__

but I suppose that isn't OK either, then.

Stephan



More information about the Python-list mailing list