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/2007-May/073149.html below:

[Python-Dev] Functools Defaults (was Python-ideas parameter omit)

[Python-Dev] Functools Defaults (was Python-ideas parameter omit) [Python-Dev] Functools Defaults (was Python-ideas parameter omit)Aaron Brady castironpi at comcast.net
Tue May 15 13:52:41 CEST 2007
> -----Original Message-----
> From: Steven Bethard [mailto:steven.bethard at gmail.com]
> Sent: Tuesday, May 15, 2007 1:54 AM
> 
> On 5/15/07, Aaron Brady <castironpi at comcast.net> wrote:
> 
> You might be able to get away without a PEP, but you'll definitely
> need to post an implementation patch to the bug tracker
> (http://sourceforge.net/tracker/?group_id=5470&atid=105470).  Once
> you've posted your implementation, you should send an email to
> python-dev asking folks what they think about it.  Be sure to give
> some code examples that using this decorator would simplify.
 
Code with proposal are in SourceForge [ 1719222 ] new functools.

Python feature

Functools gains a new decorator.

`Defaults' allows its caller to placehold non-None defaults; it becomes
unnecessary to know the value a place defaults to.

It might be useful in cases where you want the calling signature to look
alike for a group of dispatched functions and the added overhead the
decorator adds isn't a problem.  But you probably wouldn't want that
overhead all the time, so having it as an optional decorator would be good.
-Ron Adam

What -do- you think about it?

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