re: Good and Bad Practices of Coding in Python VIEW POST


Nice writing.

For the optional argument check it's also possible to do

seq = seq or []

so if it's None it will assign an empty list or use seq otherwise.
Or are there any downsides with this approach?
E: Ok in case seq is already an empty list it will be reassigned anyway.

code of conduct - report abuse