|
|
|
|
|
by LostJourneyman
1959 days ago
|
|
Quick note, the more pythonic way of checking par in this case would be just to: if par:
do_stuff()
Python does some really cool, if slightly unintuitive, checks for "truthiness" where 0, [], {}, false, '' and None (could be other cases too, brain's a little foggy today) all evaluate as false. This controls for: if par = None:
do_stuff()
not catching empty lists, empty dicts, etc. |
|