"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
What’s New in Python 3.7
11–20 of 70 posts
Re: What’s New in Python 3.7
#12"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
Perhaps it could trigger if you do function(*iterable), with a huge iterable?
>>> def f(*x): print(x[-1])
>>> f(range(300))
299
And surprisingly, in python 2.7, I was able to define a function that takes more than 255 arguments. But perhaps this only worked because I cheated and used exec. >>> exec("def f(" + ",".join("f" + str(x) for x in range(300)) + "): print(f299)"
>>> f(*range(300))
299Re: What’s New in Python 3.7
#13"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
Re: What’s New in Python 3.7
#14Switching the default encoding from ASCII to utf-8 sounds like a pretty big change.
Not really, imho. It makes more things work out of the box, but input and output for things that used to be ASCII anyway remain the same.
Guess what, changing the default encoding breaks every language that is not English.
Re: What’s New in Python 3.7
#15Earlier quoted context omitted.
Not really, imho. It makes more things work out of the box, but input and output for things that used to be ASCII anyway remain the same.
Are you American? Americans always think that changing the encoding is a minor detail. Guess what, changing the default encoding breaks every language that is not English.
Re: What’s New in Python 3.7
#16Switching the default encoding from ASCII to utf-8 sounds like a pretty big change.
If anything this should make sure programs don't break because they read some utf-8 extended character when expecting just ascii -- which is the most common case.
Re: What’s New in Python 3.7
#17"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
First thing that pops to mind is ORM for extremely column-wide tables, which are not unusual in some domains.
Re: What’s New in Python 3.7
#18"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
Re: What’s New in Python 3.7
#19"More than 255 arguments can now be passed to a function, and a function can now have more than 255 parameters." There are human devs who needed this? Or is this a sign that AI bots are now involved in language design?
Perhaps it could trigger if you do function(*iterable), with a huge iterable?
Re: What’s New in Python 3.7
#20 new_dict = {**dict1, **dict2}
It is so handy and nice