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.
...Objective-C/NeXTSTEP/OpenStep SIG on Python bindings for Objective-C/NeXTSTEP/OpenStep This sig has been retired. New postings to the mailing list will be rejected, but the archives of the old list are still available for perusal. See the SIGs home page for info about active and inactive lists. The Python / Objective C connection lives on in the PyObjC project at SourceForge! The purpose of this SIG is to complete a Python extension module binding the Objective-C and P...
...Objects Two new standard functions are defined in a module named "kinds". They return callable objects called kind objects. Each int or floating kind object f has the signature result = f(x), and each complex kind object has the signature result = f(x, y=0.). int_kind(n) For an integer argument n >= 1, return a callable object whose result is an integer kind that will hold an integer number in the open interval (-10**n, 10**n). The kind object accepts arguments that are integers including ...
...objects. Its .flush() method is a no-op. BufferedWriter The BufferedWriter implementation is for sequential-access write-only objects. Its .flush() method forces all cached data to be written to the underlying RawIOBase object. BufferedRWPair The BufferedRWPair implementation is for sequential-access read-write objects such as sockets and ttys. As the read and write streams of these objects are completely independent, it could be implemented by simply incorporating a BufferedReader and Bu...
...Objects Special Interest Group Python Distributed Objects SIG Issues All aspects of distributed, object oriented programming in Python are able to be discussed. Examples could include design and development of the CORBA binding for Python the use of other Distributed Object systems with Python, including ILU, Distributed OLE, ABB's OMF, and others. Remote Method Invocation mechanism design and implementation Distributed Objects and W...
...object with an attribute spam. The module object strips the leading spam. and stores the necessary information (eggs.ham and &fastlocals[n]) in case its binding for the name eggs changes. It then locates the object referred to by the key eggs in its dict and recursively calls: _PyObject_TrackName(eggs, "eggs.ham", &fastlocals[n]) The eggs object strips the leading eggs., stores the (ham, &fastlocals[n]) info, locates the object in its namespace called ham and calls _PyObject_Tr...
...object returns a bytes object. Slicing a bytearray object returns a bytearray object. Slice assignment to a bytearray object accepts anything that implements the PEP 3118 buffer API, or an iterable of integers in range(256). Indexing Indexing bytes and bytearray returns small ints (like the bytes type in 3.0a1, and like lists or array.array('B')). Assignment to an item of a bytearray object accepts an int in range(256). (To assign from a bytes sequence, use a slice assignment.) Str() and R...
...object connections, support for user-defined objects and access to external and internal objects. Object connections The schema is intended to describe a set of logging objects - loggers, handlers, formatters, filters - which are connected to each other in an object graph. Thus, the schema needs to represent connections between the objects. For example, say that, once configured, a particular logger has attached to it a particular handler. For the purposes of this discussion, we can say that...
...object and return a pointer to it "s" For Unicode objects: return a pointer to the object's <defenc> buffer (which uses the <default encoding>). "s#" Access to the default encoded version of the Unicode object (see Buffer Interface); note that the length relates to the length of the default encoded string rather than the Unicode object length. "t#" Same as "s#". "es" Takes two parameters: encoding (const char *) and buffer (char **). The input object is first coerced to Unicode in th...
...object type called an attribute access handler. Objects of this type have the following attributes: name (e.g. XXX, not __attr__XXX__) method (pointer to a method object) In PyClass_New, methods of the appropriate form will be detected and converted into objects (just like unbound method objects). These are stored in the class __dict__ under the name XXX. The original method is stored as an unbound method under its original name. If there are any attribute access handlers in an instance at all...
...object: The original unicode object for which encode() has been called; start: The position of the first unencodable character; end: (The position of the last unencodable character)+1 (or the length of object, if all characters from start to the end of object are unencodable); reason: The reason why object[start:end] couldn't be encoded. If object has consecutive unencodable characters, the encoder should collect those characters for one call to the callback if those characters can't be encoded...
...Objects PEP 683 introduces immortal objects as a CPython-internal feature. With immortal objects, we can share any otherwise immutable global objects between all interpreters. Consequently, this PEP does not need to address how to deal with the various objects exposed in the public C-API. It also simplifies the question of what to do about the builtin static types. (See Global Objects below.) Both issues have alternate solutions, but everything is simpler with immortal objects. If PEP 683 is ...
...objects. This led to further development of Jim's "Scarecrow" interfaces prototype. Starting with version 2.3, Zope comes with an Interface package as standard software. Zope's Interface package is used as the reference implementation for this PEP. The syntax proposed by this PEP relies on syntax enhancements describe in PEP 232 and describes an underlying framework which PEP 233 could be based upon. There is some work being done with regard to interface objects and Proxy objects, so for thos...
...object sharing infrastructure. It is within this infrastructure that object-updates "generated" by the applications are shared with the devices connected to The GravityZoo Framework. (each device running a GZF Client). Regarding these Shared objects one can think of both simple User Interface objects or complex objects related to for example the operations of a nuclear reactor. In both instances these objects are handled identically by the core of the GravityZoo Framework. Identically,...
...Object *o1, PyObject *o2); PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2); PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); PyNumber_InPlacePower(PyObject *o1, PyObject *o2); PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); PyNum...
...objects: PyObject *PyPickleBuffer_FromObject(PyObject *obj) Create a PickleBuffer object holding a view over the PEP 3118-compatible obj. PyPickleBuffer_Check(PyObject *obj) Return whether obj is a PickleBuffer instance. const Py_buffer *PyPickleBuffer_GetBuffer(PyObject *picklebuf) Return a pointer to the internal Py_buffer owned by the PickleBuffer instance. An exception is raised if the buffer is released. int PyPickleBuffer_Release(PyObject *picklebuf) Release the PickleBuffer instance'...
...object() However, this object has an uninformative and overly verbose repr, causing the function's signature to be overly long and hard to read: >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=<object object at 0x000002825DF09650>, tb=<object object at 0x000002825DF09650>, limit=None, file=None, chain=True) Additionally, two other drawbacks of many existing sentinels were brought up in the discussion...
Objective-C SIG Status Objective-C SIG Status Lele Gaifax has recently posted a much improved module to provide Python bindings to the Objective-C runtime. Bill Bumgarner is archiving the latest releases, along with quad-fat binaries and other useful Objective-C/Python stuff. Bill's archive is available at ftp://ftp.thoughtport.net/pub/next/lang/
...objects causes serious pickle bloat. For example: class C(object): # Omit "(object)" for classic class pass x = C() x.foo = 42 print len(pickle.dumps(x, 1)) The binary pickle for the classic object consumed 33 bytes, and for the new-style object 86 bytes. The reasons for the bloat are complex, but are mostly caused by the fact that new-style objects use __reduce__ in order to be picklable at all. After ample consideration we've concluded that the only way to reduce pickle sizes for new-s...
...objects, a single constant (a tuple) is set as an attribute of the function. For class and module objects, the annotations dict is always built and set as an attribute of the class or module. With this PEP, a single object is set as an attribute of the object being annotated. Most often, this object is a constant (a code object). In cases where the annotation refers to local variables or class variables, the code object will be bound to a function object, and the function object is set as the...
...object. The subclass __new__ can do two things to affect the resulting object: pass different arguments to the base class __new__, and modify the resulting object after it's been created (for example to initialize essential instance variables). __new__ must return an object. There's nothing that requires that it return a new object that is an instance of its class argument, although that is the convention. If you return an existing object, the constructor call will still call its __i...