[3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
(cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 613a95b..02924d4 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3121,8 +3121,8 @@
/*[clinic input]
_tkinter.create
- screenName: str(accept={str, NoneType}) = NULL
- baseName: str = NULL
+ screenName: str(accept={str, NoneType}) = None
+ baseName: str = ""
className: str = "Tk"
interactive: bool(accept={int}) = False
wantobjects: bool(accept={int}) = False
@@ -3130,7 +3130,7 @@
if false, then Tk_Init() doesn't get called
sync: bool(accept={int}) = False
if true, then pass -sync to wish
- use: str(accept={str, NoneType}) = NULL
+ use: str(accept={str, NoneType}) = None
if not None, then pass -use to wish
/
@@ -3141,7 +3141,7 @@
const char *baseName, const char *className,
int interactive, int wantobjects, int wantTk, int sync,
const char *use)
-/*[clinic end generated code: output=e3315607648e6bb4 input=431907c134c80085]*/
+/*[clinic end generated code: output=e3315607648e6bb4 input=da9b17ee7358d862]*/
{
/* XXX baseName is not used anymore;
* try getting rid of it. */