This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients amaury.forgeotdarc, belopolsky, brett.cannon, mark.dickinson, stingray
Date 2010-06-17.20:52:16
SpamBayes Score 2.0762561e-06
Marked as misclassified No
Message-id <>
I had understood that the rule was that alternate constructors should be classmethods, for consistency with __new__.  (Well, except that __new__ is actually a staticmethod, of course... )

E.g., after "class MyDecimal(Decimal): pass", MyDecimal('2.3') produces a MyDecimal instance, and by analogy MyDecimal.from_float(2.3) should also produce a MyDecimal instance.  It's exactly the same type of function as the class constructor.

I don't think it would do any harm to get clarification from python-dev on the underlying reasons.
Date User Action Args
2010-06-17 20:52:19mark.dickinsonsetrecipients: + mark.dickinson, brett.cannon, amaury.forgeotdarc, belopolsky, stingray
2010-06-17 20:52:19mark.dickinsonsetmessageid: <>
2010-06-17 20:52:17mark.dickinsonlinkissue2267 messages
2010-06-17 20:52:16mark.dickinsoncreate