[issue4331] Can't use _functools.partial() created function as method

2013-02-25 Thread R. David Murray
R. David Murray added the comment: See also issue 11470. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue4331] Can't use _functools.partial() created function as method

2013-02-25 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: There is at least one thing that is missing in the patch, it lacks the necessary tests. The partialbug.py demonstrates the issue, it could be used as a base. However, even then, there is still one thing that is problematic: The fact that partial() returns som

[issue4331] Can't use _functools.partial() created function as method

2013-02-08 Thread Ramchandra Apte
Changes by Ramchandra Apte : -- versions: +Python 3.3, Python 3.4 -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue4331] Can't use _functools.partial() created function as method

2013-02-07 Thread Matt Joiner
Matt Joiner added the comment: What's preventing this from being committed and closed? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue4331] Can't use _functools.partial() created function as method

2013-02-07 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: Just for the record, the behaviour is documented, unfortunately in the very last line of the functools documentation: "Also, partial objects defined in classes behave like static methods and do not transform into bound methods during instance attribute look-u

[issue4331] Can't use _functools.partial() created function as method

2012-03-24 Thread Matt Joiner
Matt Joiner added the comment: I've attached a patch that implements the descriptor protocol for functools.partial with minimum changes. -- Added file: http://bugs.python.org/file25016/functools.partial-descrget.patch ___ Python tracker

[issue4331] Can't use _functools.partial() created function as method

2012-03-24 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: +anacrolix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4331] Can't use _functools.partial() created function as method

2011-12-10 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
Jack Diederich added the comment: correction: run = partial(1) should have been run = partial(show_funcs, 1) -- ___ Python tracker ___ ___

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
Jack Diederich added the comment: We talked about it at sprints and the semantics are ambiguous and there are alternatives. Ambiguous: def show_funcs(*args): print(args) class A(): run = partial(1) ob = A() ob.run(2,3) Should this print (self, 1, 2, 3) or (1, self, 2, 3)? And what

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread R. David Murray
R. David Murray added the comment: I would expect the second and would view the first as a bug. -- nosy: +r.david.murray ___ Python tracker ___ __

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread Jack Diederich
Jack Diederich added the comment: I'm having some trouble wrapping my head around this one. It isn't obvious to me that my_method(*args): print(args) class A(): meth = partial(my_method, 'argA') ob = A() ob.meth('argB') should print (, 'argA', 'argB') and not ('argA', , 'argB') The patch

[issue4331] Can't use _functools.partial() created function as method

2010-02-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please see issue7830 for a related patch. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue4331] Can't use _functools.partial() created function as method

2010-01-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Christophe, It looks like your patch goes out of its way to avoid creating nested partials. This is a worthwhile goal and I think it should be done in partial_new so that partial(partial(f, x), y) returns partial(f, x, y). If fact, I was surprised to

[issue4331] Can't use _functools.partial() created function as method

2010-01-09 Thread Christophe Simonis
Christophe Simonis added the comment: I followed the advice of Raymond and implement a descriptor on partial. -- keywords: +patch Added file: http://bugs.python.org/file15800/issue4331.patch ___ Python tracker

[issue4331] Can't use _functools.partial() created function as method

2009-03-05 Thread Christophe Simonis
Changes by Christophe Simonis : -- nosy: +Christophe Simonis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue4331] Can't use _functools.partial() created function as method

2008-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- nosy: +belopolsky ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue4331] Can't use _functools.partial() created function as method

2008-11-16 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Reclassifying as a feature request. A descriptor could be added to partial() so that it too would have automatic method binding just like pure python functions. -- nosy: +rhettinger type: behavior -> feature request versions: +Pyth

[issue4331] Can't use _functools.partial() created function as method

2008-11-16 Thread Calvin Spealman
Calvin Spealman <[EMAIL PROTECTED]> added the comment: I don't think this is any kind of bug, it is simply a product of only function objects being decorated automatically as methods. Your python version works because it is, in fact, a function. _functools.partial objects are not functions, bu

[issue4331] Can't use _functools.partial() created function as method

2008-11-16 Thread scott sadler
scott sadler <[EMAIL PROTECTED]> added the comment: A short update, I believe that the reason that it was working in one instance was because of some abstractions by a base class (Django model, get_absolute_url). ___ Python tracker <[EMAIL PROTECTED]>

[issue4331] Can't use _functools.partial() created function as method

2008-11-15 Thread scott sadler
New submission from scott sadler <[EMAIL PROTECTED]>: Calling a function created by _functools.partial as a method raises an exception: "TypeError: method_new() takes exactly n non-keyword arguments (0 given)" Where method_new is the function passed into partial() and n is the number of argumen