Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r58063:7a071ab7fd87
Date: 2012-10-12 17:13 +0200
http://bitbucket.org/pypy/pypy/changeset/7a071ab7fd87/
Log: don't use object(). Ever
diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -144,8 +144,12 @@
target.chmod(0444) # make the file read-only, to make sure that nobody
# edits it by mistake
-_NOT_SPECIFIED = object()
-CANNOT_FAIL = object()
+class NotSpecified(object):
+ pass
+_NOT_SPECIFIED = NotSpecified()
+class CannotFail(object):
+ pass
+CANNOT_FAIL = CannotFail()
# The same function can be called in three different contexts:
# (1) from C code
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit