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.
...data is represented as str instances. The long-term plan for Python is to phase out the str type and use unicode for all string data. Clearly, a smooth migration path must be provided. We need to upgrade existing libraries, written for str instances, to be made capable of operating in an all-unicode string world. We can't change to an all-unicode world until all essential libraries are made capable for it. Upgrading the libraries in one shot does not seem feasible. A more realistic strategy i...
...data in thread-local storage is absurdly quick, because modern platforms have put massive resources into optimizing this case (e.g. dedicating a CPU register for this purpose); calling a method on an event loop to fetch a handle to a namespace and then doing lookup in that namespace is much slower. More importantly, this extra cost would be paid on every access to the global data, even for programs which are not otherwise using an event loop at all. This PEP's proposal, by contrast, only affect...
...data, quotes, publication approvals, etc. Given that we have over 60 leads to follow up with, this should easily produce enough material to fill the brochure with lots of interesting stories and show cases. The success stories that won't make this edition of the brochure will be hosted on the brochure website and are likely going to be used for future editions. Since we have already received enough material to start working on the layout, we'll enter that next phase in the coming weeks." M....
...data restoration from back-up media.) Scripting languages have become incredibly popular, and an advanced scripting language like Python makes a good starting point for our expedition. One persistent criticism on scripting languages is that their performance is inadequate for some tasks. Techniques like program analysis and advanced compiler technology may be able to eliminate part of this problem, probably in combination with some form of optional static typing. The challenge is to...
...data structures. But since that code has changed again, I'm not so sure that it makes a difference any more.) Any type that returns a collection of Booleans instead of a single boolean should define nb_nonzero() to raise an exception. Such a type is considered a non-Boolean. The == and != operators are not assumed to be each other's complement (e.g. IEEE 754 floating point numbers do not satisfy this). It is up to the type to implement this if desired. Similar for < and >=, or > and...
...data. Patch 1012740: truncate() on a writeable cStringIO now resets the position to the end of the stream. This is consistent with the original StringIO module and avoids inadvertently resurrecting data that was supposed to have been truncated away. Added socket.socketpair(). Added CurrentByteIndex, CurrentColumnNumber, CurrentLineNumber members to xml.parsers.expat.XMLParser object. The mpz, rotor, and xreadlines modules, all deprecated in earlier versions of Python, have now been removed. ...
...data in ways that help novices. Spreadsheets are of great value here, but not all data fits the matrix form. Scripting languages are growing in popularity among professional programmers [Ousterhout], but questions remain about performance, software reuse, and integration with components written in other languages. We can address these challenges by enhancing the facilities of JPython [Hugunin1], a Python dialect seamlessly integrated with Java, and SWIG, an interface generator that create...
...dataclasses this allows a clean and safe support of algebraic data types in Python. Consider this example: from dataclasses import dataclass from typing import sealed @sealed class Node: ... class Expression(Node): ... class Statement(Node): ... @dataclass class Name(Expression): name: str @dataclass class Operation(Expression): left: Expression op: str right: Expression @dataclass class Assignment(Statement): target: str value: Expression @dataclass c...
...database be closed properly, else the on-disk data and directory files can be left in mutually inconsistent states. dumbdbm.py's _Database.__del__() method attempted to close the database properly, but a shutdown race in _Database._commit() could prevent this from working, so that a program trusting __del__() to get the on-disk files in synch could be badly surprised. The race has been repaired. A sync() method was also added so that shelve can guarantee data is written to disk. The close() me...