Commit Graph

76 Commits

Author SHA1 Message Date
Serhiy Storchaka
bc62af1bbe Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:51:18 +03:00
Serhiy Storchaka
5951f2300f Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Serhiy Storchaka
f0aa88f6e8 Fixed indentation of Python examples in C comments. 2015-06-11 00:06:27 +03:00
Gregory P. Smith
9cfd4662fe fix docstring. extra \. 2013-11-25 04:30:00 +00:00
Raymond Hettinger
ef153618d6 Document that @property can incorporate a docstring from the getter method. Improve readabilty with additional whitespace. 2013-11-24 14:43:04 -08:00
Benjamin Peterson
f3ad1f94a8 use formats that work on 2.7 2012-05-01 10:16:33 -04:00
Benjamin Peterson
042c47b2c7 fix calling the classmethod descriptor directly (closes #14699) 2012-05-01 09:51:09 -04:00
Raymond Hettinger
bf7a266074 Fixup repr for dict_proxy objects. 2011-06-30 00:44:36 +01:00
Victor Stinner
e363ec1057 (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapper
descriptor, the check of the object type doesn't read the __class__ attribute
anymore.  Fix a crash if a class override its __class__ attribute (e.g. a proxy
of the str type).
2011-05-01 23:43:37 +02:00
Benjamin Peterson
4c5bc4d7f8 remove unused last argument to property_copy 2010-06-28 02:58:25 +00:00
Antoine Pitrou
c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Benjamin Peterson
97a57ec048 rewrite for style, clarify, and comments
Also, use the hasattr() like scheme of allowing BaseException exceptions through.
2009-10-22 02:50:38 +00:00
Benjamin Peterson
3c67afa714 whitespace 2009-10-22 02:26:47 +00:00
Georg Brandl
cecdc9c0e0 Remove unused variable. 2009-05-05 09:20:52 +00:00
R. David Murray
7ba8e1cbfd Fix issue 5890: (property subclass shadows __doc__ string) by inserting
the __doc__ into the subclass instance __dict__.  The fix refactors
property_copy to call property_init in such a way that the __doc__
logic is re-executed correctly when getter_doc is 1, thus simplifying
property_copy.
2009-05-04 22:16:24 +00:00
Benjamin Peterson
01c6e6fb35 many more types to initialize (I had to expose some of them) 2009-04-18 22:15:26 +00:00
Gregory P. Smith
dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Neal Norwitz
fddc469876 Prevent namespace pollution, add static for internal functions 2008-04-15 03:46:21 +00:00
Amaury Forgeot d'Arc
60d6c7f0cc Issue #2115: __slot__ attributes setting was 10x slower.
Also correct a possible crash using ABCs.

This change is exactly the same as an optimisation
done 5 years ago, but on slot *access*:
http://svn.python.org/view?view=rev&rev=28297
2008-02-15 21:22:45 +00:00
Neal Norwitz
59a65facf2 Fix refleak 2007-12-31 23:48:47 +00:00
Christian Heimes
90e10e79ea Fixed bug #1620: New @spam.getter property syntax modifies the property in place.
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
2007-12-14 02:35:23 +00:00
Andrew M. Kuchling
abfe45368c Re-word sentence 2007-11-12 01:25:21 +00:00
Christian Heimes
3d4c316f17 Added new decorator syntax to property.__doc__
Guido prefers _x over __x.
2007-11-12 01:15:40 +00:00
Guido van Rossum
d1ef78942a Issue 1416. Add getter, setter, deleter methods to properties that can be
used as decorators to create fully-populated properties.
2007-11-10 22:12:24 +00:00