Skip to content

Commit

Permalink
Fix bug if tuple.__new__() is called without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreQuentel committed Oct 23, 2023
1 parent 805a58e commit 55d9813
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/src/py_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ tuple.__new__ = function(cls, ...args){
self.__class__ = cls
self.__brython__ = true
self.__dict__ = $B.empty_dict()
if(args.length == 0){
return self
}
var arg = $B.$iter(args[0]),
next_func = $B.$call($B.$getattr(arg, "__next__"))
while(1){
Expand Down

0 comments on commit 55d9813

Please sign in to comment.