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.
...String_AsStringAndSize() function that provides access to the internal data buffer and size of a string object - or the default encoded version of a Unicode object. PyString_Size() and PyString_AsString() accept Unicode objects. The standard header <limits.h> is now included by Python.h (if it exists). INT_MAX and LONG_MAX will always be defined, even if <limits.h> is not available. PyFloat_FromString takes a second argument, pend, that was effectively useles...
...named parameters are now on average 35% faster (as measured by pybench). The undocumented C APIs PyUnicode_AsString() and PyUnicode_AsStringAndSize() were made private to the interpreter, in order to be able to refine their interfaces for Python 3.1. If you need to access the UTF-8 representation of a Unicode object as bytes string, please use PyUnicode_AsUTF8String() instead. Issue #3460: PyUnicode_Join() implementation is 10% to 80% faster thanks to Python 3.0's stricter semantics which allo...
...strings encoded in the preferred encoding, as informed by locale module's getpreferredencoding(). optparse module (and tests) upgraded to Optik 1.5a1. Changes: Add expansion of default values in help text: the string "%default" in an option's help string is expanded to str() of that option's default value, or "none" if no default value. Bug #955889: option default values that happen to be strings are now processed in the same way as values from the command line; this allow...
...string argument. Previously, this constructor ignored its arguments. As a consequence, deriving a class from a module (not from the module type) is now illegal; previously this created an unnamed module, just like invoking the module type did. [SF bug 563060] A new type object, 'basestring', is added. This is a common base type for 'str' and 'unicode', and can be used instead of types.StringTypes, e.g. to test whether something is "a string": isinstance(x, basestring) is True for Un...
...strings using a web browser. New library module difflib.py, primarily packaging the SequenceMatcher class at the heart of the popular ndiff.py file-comparison tool. doctest.py (a framework for verifying Python code examples in docstrings) is now part of the std library. Windows changes A new entry in the Start menu, "Module Docs", runs "pydoc -g" -- a small GUI that lets you browse the module docstrings using your default web browser. Import is now case-sensitive. PEP 235...
...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 operations. Notably, Windows supports 'mbcs' as the default. The Macintosh will also adopt this concept in the medium term, although the default encoding fo...
...strings are passed as function parameters in C programs they are typically represented by two variables, a pointer and a length. The SWIG bindings should automatically convert between those two C variables and a single Python string argument. If users are empowered to modify and customize code, they will be challenged to maintain those changes when the underlying software is upgraded or when system components are replaced. Version control is already a vexing problem for software developer...
If you didn't find what you need, try your search in the Python language documentation.