Skip to content
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

Merged
merged 4 commits into from
Jan 10, 2017
Merged

reSTify 10 more PEPs #175

merged 4 commits into from
Jan 10, 2017

Conversation

Mariatta
Copy link
Member

@Mariatta Mariatta commented Jan 8, 2017

PEP 221
PEP 229
PEP 240
PEP 277
PEP 286
PEP 295
PEP 297
PEP 306
PEP 341
PEP 666
🎉

#4

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
Copy link
Member Author

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 :(

Copy link
Member

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)

Copy link
Member Author

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

Copy link
Member Author

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 404

Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rendered as dunder future dunder. But I can change this to __future__ :)

screen shot 2017-01-08 at 9 52 39 am

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
Copy link
Member

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);
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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 :)
Copy link
Member

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
@Mariatta
Copy link
Member Author

Mariatta commented Jan 8, 2017

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
@berkerpeksag berkerpeksag merged commit b54f01e into python:master Jan 10, 2017
@berkerpeksag
Copy link
Member

Looks great, thanks!

@Mariatta Mariatta deleted the restify-peps branch January 10, 2017 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants