Merge
This commit is contained in:
commit
c1eb956ea8
|
@ -61,11 +61,13 @@ Defining the Encoding
|
||||||
# vim: set fileencoding=<encoding name> :
|
# vim: set fileencoding=<encoding name> :
|
||||||
|
|
||||||
More precisely, the first or second line must match the regular
|
More precisely, the first or second line must match the regular
|
||||||
expression "coding[:=]\s*([-\w.]+)". The first group of this
|
expression "^[ \t\v]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)".
|
||||||
|
The first group of this
|
||||||
expression is then interpreted as encoding name. If the encoding
|
expression is then interpreted as encoding name. If the encoding
|
||||||
is unknown to Python, an error is raised during compilation. There
|
is unknown to Python, an error is raised during compilation. There
|
||||||
must not be any Python statement on the line that contains the
|
must not be any Python statement on the line that contains the
|
||||||
encoding declaration.
|
encoding declaration. If the first line matches the second line
|
||||||
|
is ignored.
|
||||||
|
|
||||||
To aid with platforms such as Windows, which add Unicode BOM marks
|
To aid with platforms such as Windows, which add Unicode BOM marks
|
||||||
to the beginning of Unicode files, the UTF-8 signature
|
to the beginning of Unicode files, the UTF-8 signature
|
||||||
|
|
|
@ -224,10 +224,6 @@ are still controversial or not fully specified.)
|
||||||
|
|
||||||
* x = [] # type: Sequence[int]
|
* x = [] # type: Sequence[int]
|
||||||
|
|
||||||
- Type declarations using Undefined, e.g.
|
|
||||||
|
|
||||||
* x = Undefined(str)
|
|
||||||
|
|
||||||
- Casts using cast(T, x), e.g.
|
- Casts using cast(T, x), e.g.
|
||||||
|
|
||||||
* x = cast(Any, frobozz())
|
* x = cast(Any, frobozz())
|
||||||
|
|
17
pep-0514.txt
17
pep-0514.txt
|
@ -7,7 +7,7 @@ Status: Draft
|
||||||
Type: Informational
|
Type: Informational
|
||||||
Content-Type: text/x-rst
|
Content-Type: text/x-rst
|
||||||
Created: 02-Feb-2016
|
Created: 02-Feb-2016
|
||||||
Post-History: 02-Feb-2016
|
Post-History: 02-Feb-2016, 01-Mar-2016
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
========
|
========
|
||||||
|
@ -82,9 +82,9 @@ Tools that include every installed environment, even where the Company-Tag pairs
|
||||||
match, should ensure users can easily identify whether the registration was
|
match, should ensure users can easily identify whether the registration was
|
||||||
per-user or per-machine.
|
per-user or per-machine.
|
||||||
|
|
||||||
Tools that give priority to user preferences must ignore values from
|
When tools are selecting a single installed environment from all registered
|
||||||
``HKEY_LOCAL_MACHINE`` when a matching Company-Tag pair exists is in
|
environments, the intent is that user preferences from ``HKEY_CURRENT_USER``
|
||||||
``HKEY_CURRENT_USER``.
|
will override matching Company-Tag pairs in ``HKEY_LOCAL_MACHINE``.
|
||||||
|
|
||||||
Official Python releases use ``PythonCore`` for Company, and the value of
|
Official Python releases use ``PythonCore`` for Company, and the value of
|
||||||
``sys.winver`` for Tag. Other registered environments may use any values for
|
``sys.winver`` for Tag. Other registered environments may use any values for
|
||||||
|
@ -118,8 +118,8 @@ current user. Python 3.5 and later always uses different Tags for 64-bit and
|
||||||
32-bit versions.
|
32-bit versions.
|
||||||
|
|
||||||
Environments registered under other Company names must use distinct Tags to
|
Environments registered under other Company names must use distinct Tags to
|
||||||
support side-by-side installations. There is no backwards compatibility
|
support side-by-side installations. Tools consuming these registrations are
|
||||||
allowance.
|
not required to disambiguate tags other than by preferring the user's setting.
|
||||||
|
|
||||||
Company
|
Company
|
||||||
-------
|
-------
|
||||||
|
@ -242,7 +242,10 @@ Other Keys
|
||||||
Some other registry keys are used for defining or inferring search paths under
|
Some other registry keys are used for defining or inferring search paths under
|
||||||
certain conditions. A third-party installation is permitted to define these keys
|
certain conditions. A third-party installation is permitted to define these keys
|
||||||
under their Company-Tag key, however, the interpreter must be modified and
|
under their Company-Tag key, however, the interpreter must be modified and
|
||||||
rebuilt in order to read these values.
|
rebuilt in order to read these values. Alternatively, the interpreter may be
|
||||||
|
modified to not use any registry keys for determining search paths. Making such
|
||||||
|
changes is a decision for the third party; this PEP makes no recommendation
|
||||||
|
either way.
|
||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
=========
|
=========
|
||||||
|
|
Loading…
Reference in New Issue