Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Bug report
Bug description:
importstructclassMyStruct(struct.Struct):def__init__(self):super().__init__('>h')obj=MyStruct()
When I run this code I receive an error:
Traceback (most recent call last): File "/home/user/bug.py", line 7, in <module> obj = MyStruct() ^^^^^^^^^^TypeError: Struct() missing required argument 'format' (pos 1)It is rather strange error, I have passedformat parameter to base class constructor, I receive this error with any value offormat parameter.
There are no any problems with this code in Python 3.11 and older.
CPython versions tested on:
3.12
Operating systems tested on:
Linux