mirror of
https://github.com/python/cpython.git
synced 2026-05-22 12:24:30 -04:00
Added bytes and b'' as aliases for str and ''
This commit is contained in:
@@ -3238,6 +3238,9 @@ parsestr(const char *s, const char *encoding)
|
||||
quote = *++s;
|
||||
unicode = 1;
|
||||
}
|
||||
if (quote == 'b' || quote == 'B') {
|
||||
quote = *++s;
|
||||
}
|
||||
if (quote == 'r' || quote == 'R') {
|
||||
quote = *++s;
|
||||
rawmode = 1;
|
||||
|
||||
@@ -2446,6 +2446,7 @@ _PyBuiltin_Init(void)
|
||||
SETBUILTIN("True", Py_True);
|
||||
SETBUILTIN("basestring", &PyBaseString_Type);
|
||||
SETBUILTIN("bool", &PyBool_Type);
|
||||
SETBUILTIN("bytes", &PyString_Type);
|
||||
SETBUILTIN("buffer", &PyBuffer_Type);
|
||||
SETBUILTIN("classmethod", &PyClassMethod_Type);
|
||||
#ifndef WITHOUT_COMPLEX
|
||||
|
||||
Reference in New Issue
Block a user