A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-August/103023.html below:

[Python-Dev] Proposed tweaks to functools.wraps

[Python-Dev] Proposed tweaks to functools.wraps [Python-Dev] Proposed tweaks to functools.wrapsTerry Reedy tjreedy at udel.edu
Wed Aug 11 23:37:24 CEST 2010
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 my_iter class that would do what OP wanted.

-- 
Terry Jan Reedy

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4