diff options
author | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2023-06-13 15:08:16 +0200 |
---|---|---|
committer | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2023-06-13 15:08:16 +0200 |
commit | 0d4845524dff217df02bafa107302aed353e6482 (patch) | |
tree | 602ea4fb9a8ff68715c05c15a2768abccbe690d9 | |
parent | make sure the rbigint.*_int fast paths are used for comparisons between ints (diff) | |
parent | we can just use posonly args now for list.__init__ and set.__init__ (diff) | |
download | pypy-0d4845524dff217df02bafa107302aed353e6482.tar.gz pypy-0d4845524dff217df02bafa107302aed353e6482.tar.bz2 pypy-0d4845524dff217df02bafa107302aed353e6482.zip |
merge heads
-rw-r--r-- | pypy/objspace/std/listobject.py | 10 | ||||
-rw-r--r-- | pypy/objspace/std/setobject.py | 8 |
2 files changed, 2 insertions, 16 deletions
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py index e0f02c0ef4..2185ab8da8 100644 --- a/pypy/objspace/std/listobject.py +++ b/pypy/objspace/std/listobject.py @@ -465,11 +465,8 @@ class W_ListObject(W_Root): w_obj.clear(space) return w_obj - def descr_init(self, space, __args__): + def descr_init(self, space, w_iterable=None, __posonly__=None): """Initialize self. See help(type(self)) for accurate signature.""" - # this is on the silly side - w_iterable, = __args__.parse_obj( - None, 'list', init_signature, init_defaults) self.clear(space) if w_iterable is not None: self.extend(w_iterable) @@ -2304,11 +2301,6 @@ def plain_int_w(space, w_obj): # for that use case it should never raise. return w_obj._int_w(space) -# _______________________________________________________ - -init_signature = Signature(['sequence'], posonlyargcount=1) -init_defaults = [None] - # ____________________________________________________________ # Sorting diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py index 0ad50cf927..9b1c6fc925 100644 --- a/pypy/objspace/std/setobject.py +++ b/pypy/objspace/std/setobject.py @@ -158,11 +158,7 @@ class W_BaseSetObject(W_Root): # app-level operations - def descr_init(self, space, __args__): - w_iterable, = __args__.parse_obj( - None, 'set', - init_signature, - init_defaults) + def descr_init(self, space, w_iterable=None, __posonly__=None): _initialize_set(space, self, w_iterable) def descr_repr(self, space): @@ -1722,8 +1718,6 @@ def _update_from_iterable(space, w_set, w_iterable): w_set.add(w_item) -init_signature = Signature(['some_iterable'], None, None) -init_defaults = [None] def _initialize_set(space, w_obj, w_iterable=None): w_obj.clear() set_strategy_and_setdata(space, w_obj, w_iterable) |