[Python-Dev] Proposed tweaks to functools.wraps (original) (raw)
Steve Holden steve at holdenweb.com
Thu Aug 12 02:00:35 CEST 2010
- Previous message: [Python-Dev] Proposed tweaks to functools.wraps
- Next message: [Python-Dev] Proposed tweaks to functools.wraps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/11/2010 5:37 PM, Terry Reedy wrote:
On 8/11/2010 3:16 PM, Raymond Hettinger wrote:
The ability to introspect is basic to Python's design. Objects know their class, functions know their code objects, bound methods know both their underlying function, classes know their own class dictionary, etc. Should iterators know their iterable when there is one? There is or was a request for this on python-list, I believe, a few days ago. I suggested bad idea because a) iterator requirement is intentially minimal b) not all iterators have underlying object c) OP wanted to mutate underlying object (list) while iterating I did give a myiter class that would do what OP wanted. Mutation of the underlying iterable is a terrible idea. Imagine the confusion when multiple iterators are active on the same iterable. But I suspect I am preaching to the choir here.
regards Steve
Steve Holden +1 571 484 6266 +1 800 494 3119 DjangoCon US September 7-9, 2010 http://djangocon.us/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/
- Previous message: [Python-Dev] Proposed tweaks to functools.wraps
- Next message: [Python-Dev] Proposed tweaks to functools.wraps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]