[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks for the report and the PR, Andrés! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread miss-islington
miss-islington added the comment: New changeset b23b08623a46cef841038ee32948020692ef1b35 by Miss Islington (bot) in branch '3.7': bpo-34085: Improve wording on classmethod/staticmethod (GH-8228) https://github.com/python/cpython/commit/b23b08623a46cef841038ee32948020692ef1b35

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread miss-islington
miss-islington added the comment: New changeset bd96393cda54044d81054225dcfc1b26374589a8 by Miss Islington (bot) in branch '2.7': bpo-34085: Improve wording on classmethod/staticmethod (GH-8228) https://github.com/python/cpython/commit/bd96393cda54044d81054225dcfc1b26374589a8

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +12493 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 548cb6060ab9d5a66931ea2be4da08c2c72c9176 by Cheryl Sabella (Andre Delfino) in branch 'master': bpo-34085: Improve wording on classmethod/staticmethod (#8228) https://github.com/python/cpython/commit/548cb6060ab9d5a66931ea2be4da08c2c72c9176

[issue34085] doc Improve wording on classmethod/staticmethod

2019-03-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +12494 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34085] doc Improve wording on classmethod/staticmethod

2018-07-10 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +7766 stage: -> patch review ___ Python tracker ___ ___

[issue34085] doc Improve wording on classmethod/staticmethod

2018-07-10 Thread Andrés Delfino
ion definitions" "consult the documentation on the standard type hierarchy in The standard type hierarchy" PR fixes this. -- assignee: docs@python components: Documentation messages: 321390 nosy: adelfino, docs@python priority: normal severity: normal status: open title: doc Impr

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-28 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: r73005 and r73006 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5982 ___

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is there a difficulty I did not see? Here is a patch. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file14021/staticmethod_func.patch ___ Python tracker

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-20 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - amaury.forgeotdarc resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5982 ___

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-19 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: I don't remember the exact use case but it had to do with making a decorator robust enough to work for different kinds of callables (and a few common non-callables such as classmethod/staticmethod). It's not a show stopper by any means

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I am all for exposing the __func__ directly but don't immediately see how to do it. -- assignee: rhettinger - ___ Python tracker rep...@bugs.python.org

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-15 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Having to bind and unbind a classmethod to get at the function is definitely a bit weird, and also susceptible to changing implementation, but do you have a practical use case to motivate the effort needed? In Py3, '__func__' replaced

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5982 ___

[issue5982] classmethod, staticmethod: expose wrapped function

2009-05-09 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: It would be nice if classmethod/staticmethod exposed the wrapped function as a read-only attribute/property. Currently the function can be retrieved indirectly but it's obscure (and perhaps not always correct, I'm not sure): In [147

Re: classmethod staticmethod

2007-07-25 Thread Gabriel Genellina
En Tue, 24 Jul 2007 21:55:17 -0300, Alex Popescu [EMAIL PROTECTED] escribió: Neil Cerutti [EMAIL PROTECTED] wrote in news:eRwpi.36813$G23.28496 @newsreading01.news.tds.net: On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: As a matter of style, how do you figure out that class_list is a

Re: classmethod staticmethod

2007-07-25 Thread Bruno Desthuilliers
Alex Popescu a écrit : Bruno Desthuilliers [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: [snip...] Not necessarily - you can access class attributes from within an instance method (but obviously a classmethod cannot access instance attributes). What I am doing wrong here

Re: classmethod staticmethod

2007-07-25 Thread Neil Cerutti
On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in news:eRwpi.36813$G23.28496 @newsreading01.news.tds.net: On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: As a matter of style, how do you figure out that class_list is a class attribute and not

Re: classmethod staticmethod

2007-07-25 Thread Steven D'Aprano
On Wed, 25 Jul 2007 00:22:18 +, Alex Popescu wrote: Steven D'Aprano [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On Tue, 24 Jul 2007 21:35:58 +, Alex Popescu wrote: Neil Cerutti [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 2007-07-24, Alex Popescu [EMAIL

Re: classmethod staticmethod

2007-07-25 Thread Steven D'Aprano
On Wed, 25 Jul 2007 00:55:17 +, Alex Popescu wrote: Neil Cerutti [EMAIL PROTECTED] wrote in news:eRwpi.36813$G23.28496 @newsreading01.news.tds.net: On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: As a matter of style, how do you figure out that class_list is a class attribute and

Re: classmethod staticmethod

2007-07-24 Thread Marc 'BlackJack' Rintsch
On Tue, 24 Jul 2007 03:19:05 +, james_027 wrote: python's staticmethod is the equivalent of java staticmethod right? Correct. `staticmethod` is essentially just a function moved into a class and accessible at the class object and instances of that class. As Python opposed to Java has

Re: classmethod staticmethod

2007-07-24 Thread Bruno Desthuilliers
are for dealing with class attributes? Not necessarily - you can access class attributes from within an instance method (but obviously a classmethod cannot access instance attributes). Can somebody teach me the real use of classmethod staticmethod? The 'real' use is (are) the one(s) you'll find

Re: classmethod staticmethod

2007-07-24 Thread james_027
hi, The 'real' use is (are) the one(s) you'll find. FWIW, I use staticmethods for helper functions that don't need access to the class or instance but are too specific to a class to be of any use as plain functions. Which is not a very frequent case. Classmethods are more usefull - mostly as

Re: classmethod staticmethod

2007-07-24 Thread Bruno Desthuilliers
james_027 a écrit : hi, The 'real' use is (are) the one(s) you'll find. FWIW, I use staticmethods for helper functions that don't need access to the class or instance but are too specific to a class to be of any use as plain functions. Which is not a very frequent case. Classmethods are

Re: classmethod staticmethod

2007-07-24 Thread Neil Cerutti
On 2007-07-24, Alex Popescu [EMAIL PROTECTED] wrote: Bruno Desthuilliers [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: [snip...] Not necessarily - you can access class attributes from within an instance method (but obviously a classmethod cannot access instance attributes).

Re: classmethod staticmethod

2007-07-24 Thread Alex Popescu
Neil Cerutti [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 2007-07-24, Alex Popescu [EMAIL PROTECTED] wrote: Bruno Desthuilliers [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: [snip...] class MyClass(object): class_list = ['a', 'b'] def instance_method(self):

Re: classmethod staticmethod

2007-07-24 Thread Steven D'Aprano
On Tue, 24 Jul 2007 21:35:58 +, Alex Popescu wrote: Neil Cerutti [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 2007-07-24, Alex Popescu [EMAIL PROTECTED] wrote: Bruno Desthuilliers [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: [snip...] class MyClass(object):

Re: classmethod staticmethod

2007-07-24 Thread Alex Popescu
Steven D'Aprano [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On Tue, 24 Jul 2007 21:35:58 +, Alex Popescu wrote: Neil Cerutti [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 2007-07-24, Alex Popescu [EMAIL PROTECTED] wrote: Bruno Desthuilliers [EMAIL PROTECTED] wrote

Re: classmethod staticmethod

2007-07-24 Thread Neil Cerutti
On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: As a matter of style, how do you figure out that class_list is a class attribute and not an instance attribute? (I don't remember seeing anything in the PEP describing the coding style). Check out dir(MyClass) and dir(MyClass()) for some

Re: classmethod staticmethod

2007-07-24 Thread Alex Popescu
Neil Cerutti [EMAIL PROTECTED] wrote in news:eRwpi.36813$G23.28496 @newsreading01.news.tds.net: On 2007-07-25, Alex Popescu [EMAIL PROTECTED] wrote: As a matter of style, how do you figure out that class_list is a class attribute and not an instance attribute? (I don't remember seeing

classmethod staticmethod

2007-07-23 Thread james_027
classmethod are for dealing with class attributes? Can somebody teach me the real use of classmethod staticmethod? Thanks james -- http://mail.python.org/mailman/listinfo/python-list