Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(85)

Side by Side Diff: Doc/library/sys.rst

Issue 14105: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. (Closed) Base URL: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: Created 16 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Include/longintrepr.h » ('j') | Include/longintrepr.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 :mod:`sys` --- System-specific parameters and functions 2 :mod:`sys` --- System-specific parameters and functions
3 ======================================================= 3 =======================================================
4 4
5 .. module:: sys 5 .. module:: sys
6 :synopsis: Access system-specific parameters and functions. 6 :synopsis: Access system-specific parameters and functions.
7 7
8 8
9 This module provides access to some variables used or maintained by the 9 This module provides access to some variables used or maintained by the
10 interpreter and to functions that interact strongly with the interpreter. It is 10 interpreter and to functions that interact strongly with the interpreter. It is
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 else: 406 else:
407 # use an alternative implementation or warn the user 407 # use an alternative implementation or warn the user
408 ... 408 ...
409 409
410 This is called ``hexversion`` since it only really looks meaningful when view ed 410 This is called ``hexversion`` since it only really looks meaningful when view ed
411 as the result of passing it to the built-in :func:`hex` function. The 411 as the result of passing it to the built-in :func:`hex` function. The
412 ``version_info`` value may be used for a more human-friendly encoding of the 412 ``version_info`` value may be used for a more human-friendly encoding of the
413 same information. 413 same information.
414 414
415 415
416 .. data:: int_info
417
418 A struct sequence that holds information about Python's
Martin v. Löwis 2009/02/17 22:39:18 I don't think the sequence interface is really imp
dickinsm 2009/02/18 17:06:33 Agreed. All that's important here is the attribut
419 internal representation of integers. The attributes are read only.
420
421 +-------------------------+----------------------------------------------+
422 | attribute | explanation |
423 +=========================+==============================================+
424 | :const:`bits_per_digit` | number of bits held in each digit. Python |
425 | | integers are stored internally in base |
426 | | ``2**int_info.bits_per_digit`` |
427 +-------------------------+----------------------------------------------+
428 | :const:`sizeof_digit` | size in bytes of the C type used to |
429 | | represent a digit |
430 +-------------------------+----------------------------------------------+
431
432
416 .. function:: intern(string) 433 .. function:: intern(string)
417 434
418 Enter *string* in the table of "interned" strings and return the interned str ing 435 Enter *string* in the table of "interned" strings and return the interned str ing
419 -- which is *string* itself or a copy. Interning strings is useful to gain a 436 -- which is *string* itself or a copy. Interning strings is useful to gain a
420 little performance on dictionary lookup -- if the keys in a dictionary are 437 little performance on dictionary lookup -- if the keys in a dictionary are
421 interned, and the lookup key is interned, the key comparisons (after hashing) 438 interned, and the lookup key is interned, the key comparisons (after hashing)
422 can be done by a pointer compare instead of a string compare. Normally, the 439 can be done by a pointer compare instead of a string compare. Normally, the
423 names used in Python programs are automatically interned, and the dictionarie s 440 names used in Python programs are automatically interned, and the dictionarie s
424 used to hold module, class or instance attributes have interned keys. 441 used to hold module, class or instance attributes have interned keys.
425 442
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 framework. 800 framework.
784 801
785 802
786 .. data:: winver 803 .. data:: winver
787 804
788 The version number used to form registry keys on Windows platforms. This is 805 The version number used to form registry keys on Windows platforms. This is
789 stored as string resource 1000 in the Python DLL. The value is normally the 806 stored as string resource 1000 in the Python DLL. The value is normally the
790 first three characters of :const:`version`. It is provided in the :mod:`sys` 807 first three characters of :const:`version`. It is provided in the :mod:`sys`
791 module for informational purposes; modifying this value has no effect on the 808 module for informational purposes; modifying this value has no effect on the
792 registry keys used by Python. Availability: Windows. 809 registry keys used by Python. Availability: Windows.
OLDNEW
« no previous file with comments | « no previous file | Include/longintrepr.h » ('j') | Include/longintrepr.h » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b