Live data from Hacker News

What’s New in Python 3.7

docs.python.org

1–10 of 70 posts

Re: What’s New in Python 3.7

#3
"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

#4
post #3

"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?

Could be useful for code autogeneration of some ilk.

Re: What’s New in Python 3.7

#5
post #2

Switching 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.

Re: What’s New in Python 3.7

#6
post #3

"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

#7
post #6
post #3

"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?

I think *iterable would just pass one argument that's a list, not pass each argument individually

Re: What’s New in Python 3.7

#8
post #7
post #6

Earlier quoted context omitted.

Perhaps it could trigger if you do function(*iterable), with a huge iterable?

I think *iterable would just pass one argument that's a list, not pass each argument individually

    >>> print([1,2,3])
    [1,2,3]
    >>> print(*[1,2,3])
    1 2 3

Re: What’s New in Python 3.7

#9
post #7
post #6

Earlier quoted context omitted.

Perhaps it could trigger if you do function(*iterable), with a huge iterable?

I think *iterable would just pass one argument that's a list, not pass each argument individually

The asterisk at the call site (where it turns an iterable into multiple passed arguments) not the function definition site (where it collects otherwise unconsumed arguments into a single list.)

Re: What’s New in Python 3.7

#10
post #7
post #6

Earlier quoted context omitted.

Perhaps it could trigger if you do function(*iterable), with a huge iterable?

I think *iterable would just pass one argument that's a list, not pass each argument individually

There may be some optimization at the interpreter level, but it appears to Python that each element of 'iterable' is passed as an individual argument
Post reply on HN