Why must priority go last? BEBellaRossiOP 15 Sep, 11:39 Stage 2 says to add it at the end of the parameter list.
NONoahLoops15 Sep, 14:44replies: 2Existing calls pass arguments by position. If you insert priority in the middle, old calls would suddenly pass their timeout into priority. Adding new optional parameters at the end keeps every existing caller working.
MAMateoG15 Sep, 18:47Also: parameters with defaults must come after parameters without defaults, or Python raises a SyntaxError.
Comments 4
Join the discussion CommentAlready have an account? Log in
Existing calls pass arguments by position. If you insert
priorityin the middle, old calls would suddenly pass their timeout into priority. Adding new optional parameters at the end keeps every existing caller working."Don't break the callers" — got it.
Found that out the hard way 😄
Also: parameters with defaults must come after parameters without defaults, or Python raises a SyntaxError.