-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reSTify 10 more PEPs #175
reSTify 10 more PEPs #175
Conversation
PEP 221 PEP 229 PEP 240 PEP 277 PEP 286 PEP 295 PEP 297 PEP 306 PEP 341 PEP 666 :)
|
||
|
||
References | ||
========== | ||
|
||
.. [1] http://sourceforge.net/patch/?func=detailpatch&patch_id=101135&group_id=5470 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1] and [2] now returns 404 :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For [1], the actual commit is python/cpython@e6ba0ed (we probably need to use the changeset from hg.python.org since the GitHub link will be broken when we switched to GitHub)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the correct commit in hg.python.org https://hg.python.org/cpython/rev/18385172fac0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated :)
.. [1] Microsoft Windows APIs | ||
http://msdn.microsoft.com/ | ||
|
||
.. [2] http://scintilla.sourceforge.net/winunichanges.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the final patch has been attached to bugs.python.org, we can now delete the sourceforge.net link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this :) Thanks.
checked in. The patch can still be found in the SourceForge patch | ||
manager [1]_. Currently, a ``NAME`` field is used in the grammar rather | ||
than a bare string, to avoid the keyword issue. It introduces a | ||
new bytecode, IMPORT_STAR, which performs the ``from module import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``IMPORT_STAR``
new bytecode, IMPORT_STAR, which performs the ``from module import | ||
\*`` behaviour, and changes the behaviour of the ``IMPORT_FROM`` | ||
bytecode so that it loads the requested name (which is always a | ||
single name) onto the stack, to be subsequently stored by a STORE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``STORE``
``global`` directives. | ||
|
||
The special case of ``from module import *`` remains a special case, | ||
in that it cannot accommodate an ``as`` clause, and that no STORE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``STORE``
statement, and indicate that to get floating point literals, | ||
they should be suffixed with "e0". | ||
2. Python 3.0 will have a warning, turned on by default, about | ||
such literals in the absence of a __future__ statement. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check that __future__ renders correctly (e.g. not future) in reST format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tuple, adding an __dict__ member (at tp_dictoffset -4). Instances | ||
of this type might get the following attributes: | ||
A new type 'argument tuple' is introduced. This type derives from | ||
tuple, adding an ``__dict__`` member (at tp_dictoffset -4). Instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``tp_dictoffset``
- PyArgTuple_AddOkObject(PyObject*, PyObject*); | ||
- PyArgTuple_AddOkMemory(PyObject*, void*); | ||
- PyArgTuple_ClearFailed(PyObject*); | ||
- PyArgTuple_New(int); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you've already marked other Py* functions with ``Py*``, I'd expect the same for these too.
|
||
To simplify Unicode conversion, the ``e*`` converters are duplicated | ||
as ``E*`` converters (Es, Et, Es#, Et#). The usage of the ``E*`` | ||
converters is identical to that of the e* converters, except that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``e*`` (this one has already been updated above)
- ignore the first character after opening quotation, if it is | ||
newline | ||
|
||
- second: ignore in string constants all spaces and tabs up to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are here we can delete "second:". "This PEP suggest two things:" is already implies that here are two items.
add-ons $stdlibpath/site-packages which is appended to the | ||
sys.path at interpreter startup time. | ||
1. Adding a new standard search path to sys.path: | ||
$stdlibpath/system-packages just before the $stdlibpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``$stdlibpath/system-packages``
``$stdlibpath``
(there are multiple instances that needs to be formatted)
|
||
__ Grammar/Grammar: OK, you'd probably worked this one out :) | ||
\__ Grammar/Grammar: OK, you'd probably worked this one out :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__ can be replaced by #.
or a plain list.
PEP 221: IMPORT_STAR STORE PEP 229: zlib PEP 240: __future__ from __future__ import rational_literals PEP 286: tp_dictoffset Py* methods PEP 295: remove 'second,' PEP 297: $stdlibpath* PEP 306: link to cpython dev guide replace __ with bullet list items
Thanks for the review, @berkerpeksag :) I made additional changes. Please let me know if I missed anything. |
PEP 221 - replace sourceforge url to hg.python.org patch url PEP 277 - remove experimental implementation link
Looks great, thanks! |
PEP 221
PEP 229
PEP 240
PEP 277
PEP 286
PEP 295
PEP 297
PEP 306
PEP 341
PEP 666
🎉
#4