[issue1673203] add identity function

2013-10-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:


--
nosy: +piotr.dobrogost

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1673203
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1673203] add identity function

2009-04-01 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
resolution:  - rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1673203
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1673203] add identity function

2009-03-30 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

I suggest closing per
http://mail.python.org/pipermail/python-ideas/2009-March/003647.html

--
components: +Extension Modules -None
nosy: +ajaksu2
priority: normal - low
stage:  - test needed
versions: +Python 2.7, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1673203
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1673203] add identity function

2008-02-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Raymond Hettinger wrote in msg63027 (issue2186):


.. it looks like there [is an] agreement on dropping None for map() and 
going forward with the operator.identity() patch.  Will check these in 
in the next couple of days.


This leaves open the issue of multi-argument identity.  I would argue 
that def identity(*args): return args[-1] # or args[0] will conflict 
with the use of identity instead of None in map: map(identity, x, y, ..) 
will silently produce results different from current map(None, x, y, 
..).  It is possible to make identity behave exactly like None in map by 
defining it  as

def identity(*args):
   if len(args) == 1:
  return args[0]
   else:
  return args
 
While there is certain cuteness in making identity(...) equivalent to 
(...), it is a bit too cute for my taste.  I am -1 on multi-argument 
identity.

Also placement of identity in operator while map is in builtin, may 
complicate implementation of passthrough map optimization.  While it is 
possible to avoid importing operator in builtin by implementing identity  
in builtin but exporting it only from operator, a more straightforward 
solution would be to keep map and identity in the same module.  This 
logic may be a slippery slope, however, because optimizing filterfalse, 
would suggest that operator.not_ should be moved in the same module as 
the ultimate location for filterfalse. I am +1 on implementing 
optimization for map(identity, ..), +0 on that for filterfalse(not_, 
..), 0 on the location of identity. (BTW, maybe we should implement 
optimization for filter(not_, ..) and drop filterfalse altogether.)

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1673203
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1673203] add identity function

2008-01-06 Thread Christian Heimes

Christian Heimes added the comment:

What's the conclusion of your discussion? Do you consent to close the
feature request?

--
nosy: +tiran

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1673203
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com