Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
*args and Tuples
#3
Thank you for confirming that suspicion.

I will inscribe:
def func(*items):
items = list(items)

With my biggest, thickest magic marker into my notebook.

In all the books and videos I have on teaching python this fundamental rule has not been mentioned, unless I was braindead while I glossed over it!

Its a critical one for me. For my purposes, tuples make little sense, as mutable lists(arrays) are one of the main purposes for me even bothering to learn python.
Reply


Messages In This Thread
*args and Tuples - by millpond - Aug-22-2019, 04:22 AM
RE: *args and Tuples - by Gribouillis - Aug-22-2019, 05:04 AM
RE: *args and Tuples - by millpond - Aug-22-2019, 07:44 AM
RE: *args and Tuples - by Gribouillis - Aug-22-2019, 07:59 AM
RE: *args and Tuples - by joe_momma - Dec-15-2019, 05:54 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020