summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/intobject.c5
-rw-r--r--Objects/setobject.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c
index 256824c..31d8130 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -1050,8 +1050,9 @@ Convert a string or number to an integer, if possible. A floating point\n\
argument will be truncated towards zero (this does not include a string\n\
representation of a floating point number!) When converting a string, use\n\
the optional base. It is an error to supply a base when converting a\n\
-non-string. If the argument is outside the integer range a long object\n\
-will be returned instead.");
+non-string. If base is zero, the proper base is guessed based on the\n\
+string content. If the argument is outside the integer range a\n\
+long object will be returned instead.");
static PyNumberMethods int_as_number = {
(binaryfunc)int_add, /*nb_add*/
diff --git a/Objects/setobject.c b/Objects/setobject.c
index be829a8..a0cb7be 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1024,7 +1024,7 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject *iterable = NULL, *result;
- if (!_PyArg_NoKeywords("frozenset()", kwds))
+ if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds))
return NULL;
if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable))
@@ -1068,7 +1068,7 @@ PySet_Fini(void)
static PyObject *
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- if (!_PyArg_NoKeywords("set()", kwds))
+ if (type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds))
return NULL;
return make_new_set(type, NULL);