I often find that python lacks a nice way to say "only pass an argument
under this condition". (See previous python-list email in "Idea: Deferred
Default Arguments?")
Example 1: Defining a list with conditional elements
include_bd = True
current_way = ['a'] + (['b'] if include_bd else [])
Hi,
I've found myself typing too many time this:
pathlib.Path("some-dir-name").mkdir(parent=True, exist_ok=True)
Wouldn't be better to have a pathlib.Path.makedirs with parent/exist_ok set
to True by default?
Thanks
___
Python-ideas mailing list -- pyth
Hello,
In Modules/main.c, wherever PyImport_ImportModule() is use, the variables
(runpy and sys) are named as follows:
runpy = PyImport_ImportModule("runpy");// line 265
sys = PyImport_ImportModule("sys"); // line 444
Can we also rename 'mod' to 'readline' for consistency in line 2