documentation - How to interpret python call signatures with nested lists -


i have been looking @ documentation python datetime library, , confused call signatures. example, datetime.timedelta can called in following way

datetime.timedelta(10, 68400) 

however, call signature documented as

datetime.timedelta([days[, seconds[, microseconds[, milliseconds[, minutes[, hours[, weeks]]]]]]]) 

i uncertain how interpret nested lists in call signature, , how relate ways in can call timedelta.

there related answer here, , duplicate of question: what square brackets, "[]", mean in function/class documentation?

either can give options in order, example: timedelta(1, 2, 3) 1 day, 2 seconds , 3 microseconds, or specify arguments you're interested in: timedelta(days=1, microseconds=4) , allows put them in order, and/or omit options don't need.

edit: ok think answer: why python function docs include comma after bracket optional args?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -