Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
From 28 Oct. through 30 Oct., 2016
Location: Leonardo Royal Hotel Munich, Moosacher Str. 90, 80809 München, Germany
PyCon DE 2016
...str</font>): def g(x): return <font color="red">str</font>(x) return g System Message: WARNING/2 (<string>, line 68) Definition list ends without a blank line; unexpected unindent. </pre> In this example, the use of <font color="red">str</font> inside the inner function g() now refers to the argument <font color="red">str</font> in the outer function f(); previously (without nested scopes), it would refer to ...
...str</font>): def g(x): return <font color="red">str</font>(x) return g System Message: WARNING/2 (<string>, line 58) Definition list ends without a blank line; unexpected unindent. </pre> In this example, the use of <font color="red">str</font> inside the inner function g() now refers to the argument <font color="red">str</font> in the outer function f(); previously (without nested scopes), it would refer to ...
...str</font>): def g(x): return <font color="red">str</font>(x) return g System Message: WARNING/2 (<string>, line 84) Definition list ends without a blank line; unexpected unindent. </pre> In this example, the use of <font color="red">str</font> inside the inner function g() now refers to the argument <font color="red">str</font> in the outer function f(); previously (without nested scopes), it would refer to ...
...str</font>): def g(x): return <font color="red">str</font>(x) return g System Message: WARNING/2 (<string>, line 109) Definition list ends without a blank line; unexpected unindent. </pre> In this example, the use of <font color="red">str</font> inside the inner function g() now refers to the argument <font color="red">str</font> in the outer function f(); previously (without nested scopes), it would refer to...
...structor, rather than passing value as a single argument (and an empty tuple calls the constructor without arguments). This makes a difference because there's a difference between f(a, b) and f((a, b)). These are all compromises - they work well with the kind of arguments that the standard exceptions typically take (like a simple string). For clarity in new code, the form raise class(argument, ...) is recommended (i.e. make an explicit call to the constructor). How ...
Version: None
Released: Sept. 6, 2022
This is a security release of Python 3.9 Note: The release you're looking at is Python 3.9.14, a security bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. Security content in this …
View Release Notes
This is a security release of Python 3.8 Note: The release you're looking at is Python 3.8.14, a security bugfix release for the legacy 3.8 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here. Security content in this …
...string methods and a new regular expression engine: String methods mean that you can now say s.lower() etc. instead of importing the string module and saying string.lower(s) etc. One peculiarity is that the equivalent of string.join(sequence, delimiter) is delimiter.join(sequence). Use " ".join(sequence) for the effect of string.join(sequence); to make this more readable, try space=" " first. Note that the maxsplit argument defaults in split() and replace() have ...
Note: The release you are looking at is a security bugfix release for the legacy 3.7 series which has now reached end-of-life and is no longer supported. See the downloads page for currently supported versions of Python. The final source-only security fix release for 3.7 was 3.7.17. Please see …
...string methods and a new regular expression engine: String methods mean that you can now say s.lower() etc. instead of importing the string module and saying string.lower(s) etc. One peculiarity is that the equivalent of string.join(sequence, delimiter) is delimiter.join(sequence). Use " ".join(sequence) for the effect of string.join(sequence); to make this more readable, try space=" " first. Note that the maxsplit argument defaults in split() and replace() have changed f...
...structures that were limited to 2^32 objects can now hold up to 2^64 instead. New or upgraded built-ins partition and rpartition methods were added to str and unicode. This greatly simplifies the process of searching and splitting strings. New builtins any and all evaluate whether an iterator contains any or all True values, respectively. min and max gained a key keyword parameter, analogous to sort. New or upgraded modules and packages In keeping with the theme of adding tried and true pack...
...strates some of the effects of the change. The new rules will cause existing code to break if it defines nested functions where an outer function has local variables with the same name as globals or builtins used by the inner function. Example: def munge(str): def helper(x): return str(x) if type(str) != type(''): str = helper(str) return str.strip() Under the old rules, the name str in helper() is bound to the builtin function str(). Under the new rules, it will ...
...str8 now has the same construction signature as bytes. Comparisons between str and str8 now return False/True for ==/!=. sqlite3 returns str8 when recreating on object from it's __conform__ value. The struct module returns str8 for all string-related formats. This was true before this change, but becomes more apparent thanks to string comparisons always being False. Replaced PyFile_FromFile() with PyFile_FromFd(fd, name. mode, buffer, encoding, newline). Fixed imp.find_module() to obey the -- ...
...string[, base_number]]) long([number_or_string]) float([number_or_string]) complex([number_or_string[, imag_number]]) str([object]) unicode([string[, encoding_string]]) tuple([iterable]) list([iterable]) type(object) or type(name_string, bases_tuple, methods_dict) The signature of type() requires an explanation: traditionally, type(x) returns the type of object x, and this usage is still supported. However, type(name, bases, methods) is a new usage that creates...
...string literals is introduced, "raw strings": e.g. r"n" is equal to "\n". All standard exceptions and most exceptions defined in standard extension modules are now classes. Use python -X to revert back to string exceptions. See Standard Exception Classes for more info. Comparisons can now raise exceptions (previously, exceptions occurring during comparisons were swept under the rug). New dictionary methods: .clear(), .copy(), .update(), .get(). The first two are ...
...strate these new features (the .encode() and .decode() columns indicate the type of the returned objects): Name .encode() .decode() Description uu string string UU codec (e.g. for email) base64 string string base64 codec quopri string string quoted-printable codec zlib string string zlib compression hex string string 2-byte hex codec rot-13 string Unicode ROT-13 Unicode charmap codec Some operating systems now support the concept of a default Unicode encoding for file system ...
If you didn't find what you need, try your search in the Python language documentation.