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/2003-October/039342.html below:

[Python-Dev] Re: closure semantics

[Python-Dev] Re: closure semantics [Python-Dev] Re: closure semanticsTerry Reedy tjreedy at udel.edu
Thu Oct 23 00:03:29 EDT 2003
"David Eppstein" <eppstein at ics.uci.edu> wrote in message
news:eppstein-567571.16030622102003 at sea.gmane.org...
> If I implement it as a collection of methods of an object, I then
have
> to include a separate function which creates an instance of the
object
> and immediately destroys it.  This seems clumsy and also doesn't fit
> with my intuition about what objects are for (representing
persistent
> structure).  Also, again, modularity is violated -- outside code
should
> not be making instances of this object or accessing its methods.

So why not define the class inside the master function to keep it
private?
For a complex algorithm, re-setup time should be relatively
negligible.

Terry J. 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