[Python-Dev] iterator API in Py3.0 (original) (raw)
Barry Warsaw barry at python.org
Fri Mar 3 22:23:54 CET 2006
- Previous message: [Python-Dev] iterator API in Py3.0
- Next message: [Python-Dev] FrOSCon 2006 - Call for {Papers|Projects}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2006-03-03 at 13:06 -0800, Michael Chermside wrote:
I think it's clear that if a method is invoked magically, it ought to have underscores; if it is invoked directly then it ought not to. next() is invoked both ways, so the question is which of the following invariants we would rather maintain:
* Any method that gets invoked 'magically' (by syntax) will have underscores. * Any method with underscores should be invoked directly only if you are practicing deep magic.
Practicality beats purity, so IMHO if the user should type it, it should not have underscores. If we grow a built-in next() -- which I'm -0 on, then clearly it should get renamed to next() because then the user would /not/ be expected to write it.
-Barry
-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 309 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20060303/cc787145/attachment.pgp
- Previous message: [Python-Dev] iterator API in Py3.0
- Next message: [Python-Dev] FrOSCon 2006 - Call for {Papers|Projects}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]