Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5aff27ae
Commit
5aff27ae
authored
Feb 18, 2013
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#7963: fix error message when 'object' called with arguments.
Patch by Alexander Belopolsky.
parent
c8e75ba2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Misc/NEWS
Misc/NEWS
+3
-0
Objects/typeobject.c
Objects/typeobject.c
+2
-2
No files found.
Misc/NEWS
View file @
5aff27ae
...
...
@@ -9,6 +9,9 @@ What's New in Python 2.7.4
Core and Builtins
-----------------
- Issue #7963: Fixed misleading error message that issued when object is
called without arguments.
- Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
...
...
Objects/typeobject.c
View file @
5aff27ae
...
...
@@ -2897,14 +2897,14 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
type
->
tp_init
!=
object_init
)
{
err
=
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"object
.__new__
() takes no parameters"
,
"object() takes no parameters"
,
1
);
}
else
if
(
type
->
tp_new
!=
object_new
||
type
->
tp_init
==
object_init
)
{
PyErr_SetString
(
PyExc_TypeError
,
"object
.__new__
() takes no parameters"
);
"object() takes no parameters"
);
err
=
-
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment