New submission from Serhiy Storchaka:

set.__init__ have checks PyAnySet_Check(self) and PySet_Check(self). They are 
redundant since set.__init__ can't be called for non-set.

>>> set.__init__(frozenset(), ())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: descriptor '__init__' requires a 'set' object but received a 
'frozenset'

Do I miss something?

----------
assignee: rhettinger
components: Interpreter Core
files: set_init.patch
keywords: patch
messages: 264467
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Remove redundant checks from set.__init__
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file42644/set_init.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to