Re: [Python-Dev] [Python-checkins] cpython (3.3): Add -b and -X options to python man page.

On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran < python-checkins@python.org> wrote:
http://hg.python.org/cpython/rev/dfead0696a71 changeset: 84224:dfead0696a71 branch: 3.3 parent: 84221:0113247f894b user: Senthil Kumaran <senthil@uthcode.com> date: Wed Jun 19 22:19:46 2013 -0500 summary: Add -b and -X options to python man page. Patch contributed by Corey Brune.
files: Misc/python.man | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Misc/python.man b/Misc/python.man --- a/Misc/python.man +++ b/Misc/python.man @@ -11,6 +11,9 @@ .B \-B ] [ +.B \-b +] +[ .B \-d ] [ @@ -23,14 +26,14 @@ .B \-i ] [ -.B \-m +.B \-m .I module-name ] -[ -.B \-q -] .br [ +.B \-q +] +[ .B \-O ] [ @@ -60,6 +63,10 @@ .B \-x ] [ +[ +.B \-X +.I option +] .B \-? ] .br @@ -105,6 +112,10 @@ .I .py[co] files on import. See also PYTHONDONTWRITEBYTECODE. .TP +.B \-b +Issue warnings about str(bytes_instance), str(bytearray_instance) +and comparing bytes/bytearray with str. (-bb: issue errors) +.TP .BI "\-c " command Specify the command to execute (see next section). This terminates the option list (following options are passed as @@ -243,6 +254,9 @@ field matches the line number, where zero matches all line numbers and is thus equivalent to an omitted line number. .TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
+.TP .B \-x Skip the first line of the source. This is intended for a DOS specific hack only. Warning: the line numbers in error messages will
-- Repository URL: http://hg.python.org/cpython
_______________________________________________ Python-checkins mailing list Python-checkins@python.org http://mail.python.org/mailman/listinfo/python-checkins

On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
http://hg.python.org/cpython/rev/dfead0696a71 changeset: 84224:dfead0696a71 branch: 3.3 parent: 84221:0113247f894b user: Senthil Kumaran <senthil@uthcode.com> date: Wed Jun 19 22:19:46 2013 -0500 summary: Add -b and -X options to python man page. Patch contributed by Corey Brune.
files: Misc/python.man | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Misc/python.man b/Misc/python.man --- a/Misc/python.man +++ b/Misc/python.man @@ -11,6 +11,9 @@ .B \-B ] [ +.B \-b +] +[ .B \-d ] [ @@ -23,14 +26,14 @@ .B \-i ] [ -.B \-m +.B \-m .I module-name ] -[ -.B \-q -] .br [ +.B \-q +] +[ .B \-O ] [ @@ -60,6 +63,10 @@ .B \-x ] [ +[ +.B \-X +.I option +] .B \-? ] .br @@ -105,6 +112,10 @@ .I .py[co] files on import. See also PYTHONDONTWRITEBYTECODE. .TP +.B \-b +Issue warnings about str(bytes_instance), str(bytearray_instance) +and comparing bytes/bytearray with str. (-bb: issue errors) +.TP .BI "\-c " command Specify the command to execute (see next section). This terminates the option list (following options are passed as @@ -243,6 +254,9 @@ field matches the line number, where zero matches all line numbers and is thus equivalent to an omitted line number. .TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
+.TP .B \-x Skip the first line of the source. This is intended for a DOS specific hack only. Warning: the line numbers in error messages will
-- Repository URL: http://hg.python.org/cpython
_______________________________________________ Python-checkins mailing list Python-checkins@python.org http://mail.python.org/mailman/listinfo/python-checkins
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com

On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else. --David

On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray <rdmurray@bitdance.com> wrote:
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else.
--David
you mean "CPython does not have any implementation-specific options"? I would claim -O behavior should be implementation-specific since it's nonsense in the optimizations sense, but other than that, it does not seem that there is any -X options?

3.3 adds some -X options around faulthandler if I recall correctly. Alex On Mon, Jun 24, 2013 at 1:14 PM, Maciej Fijalkowski <fijall@gmail.com>wrote:
On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray <rdmurray@bitdance.com> wrote:
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else.
--David
you mean "CPython does not have any implementation-specific options"? I would claim -O behavior should be implementation-specific since it's nonsense in the optimizations sense, but other than that, it does not seem that there is any -X options? _______________________________________________ Python-checkins mailing list Python-checkins@python.org http://mail.python.org/mailman/listinfo/python-checkins
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084

On Mon, 24 Jun 2013 22:14:46 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray <rdmurray@bitdance.com> wrote:
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else.
--David
you mean "CPython does not have any implementation-specific options"? I would claim -O behavior should be implementation-specific since it's nonsense in the optimizations sense, but other than that, it does not seem that there is any -X options?
There is one. -X faulthandler. I'm sure others would agree about -O, but that long predates -X. So, the idea is that -X *can* be used by other implementations for their own purposes, but there is certainly no requirement that they do so. Our promise is that anything CPython uses it for is something we don't expect other implementations to support. --David

2013/6/24 R. David Murray <rdmurray@bitdance.com>:
There is one. -X faulthandler. I'm sure others would agree about -O, but that long predates -X.
FYI I didn't chose "-X" because it is specific to CPython, but just because it becomes really hard to choose a random letter to add a new option... I prefer long options, but Python only supports the long option --help. IMO "python -X faulthandler" is more explicit than "python -@" (or "python -f", or any other random letter). If you didn't know, you can also write "python -X faulthandler=1", it does also enable faulthandler... As "python -X faulthandler=0" and "python -X faulthandler=False" :-) (PHP style!)
So, the idea is that -X *can* be used by other implementations for their own purposes, but there is certainly no requirement that they do so. Our promise is that anything CPython uses it for is something we don't expect other implementations to support.
It would be nice to have faulthandler or something similar (dump traces on a crash) in other Python implementations :-) faulthandler implementation is very specific to CPython. It uses internal structures and low-level OS features like signal handler and a specific stack for its signal handler. It is better to have it integrated directly into CPython. (But it is also available as a third party module for older versions.) Victor

On Tue, Jun 25, 2013 at 12:28:09AM +0200, Victor Stinner wrote:
2013/6/24 R. David Murray <rdmurray@bitdance.com>:
There is one. -X faulthandler. I'm sure others would agree about -O, but that long predates -X.
FYI I didn't chose "-X" because it is specific to CPython, but just because it becomes really hard to choose a random letter to add a new option... I prefer long options, but Python only supports the long option --help.
Is that a policy though? Couldn't Python support long options, or is it prohibited? -- Steven

On 25 Jun 2013 09:03, "Steven D'Aprano" <steve@pearwood.info> wrote:
On Tue, Jun 25, 2013 at 12:28:09AM +0200, Victor Stinner wrote:
2013/6/24 R. David Murray <rdmurray@bitdance.com>:
There is one. -X faulthandler. I'm sure others would agree about -O, but that long predates -X.
FYI I didn't chose "-X" because it is specific to CPython, but just because it becomes really hard to choose a random letter to add a new option... I prefer long options, but Python only supports the long option --help.
Is that a policy though? Couldn't Python support long options, or is it prohibited?
Just impractical. It will likely be more feasible to support them in a maintainable way once PEP 432 is done and we can lean on the C API more heavily while processing command line arguments. Cheers, Nick.
-- Steven _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:
http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com

2013/6/24 Maciej Fijalkowski <fijall@gmail.com>:
On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray <rdmurray@bitdance.com> wrote:
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else.
--David
you mean "CPython does not have any implementation-specific options"? I would claim -O behavior should be implementation-specific since it's nonsense in the optimizations sense, but other than that, it does not seem that there is any -X options?
I wouldn't object to making that -Xno-docstrings or such, but the ship sailed long ago on -O. -- Regards, Benjamin

On Mon, Jun 24, 2013 at 4:43 PM, Benjamin Peterson <benjamin@python.org>wrote:
2013/6/24 Maciej Fijalkowski <fijall@gmail.com>:
On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray <rdmurray@bitdance.com> wrote:
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski < fijall@gmail.com> wrote:
On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon <brett@python.org> wrote:
On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran <python-checkins@python.org> wrote:
.TP +.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
CPython does. We introduced it for ourselves, it is up to other implementations whether or not to use it, or use something else.
--David
you mean "CPython does not have any implementation-specific options"? I would claim -O behavior should be implementation-specific since it's nonsense in the optimizations sense, but other than that, it does not seem that there is any -X options?
I wouldn't object to making that -Xno-docstrings or such, but the ship sailed long ago on -O.
Python 4 change! =)

On Sun, Jun 23, 2013 at 8:40 AM, Maciej Fijalkowski <fijall@gmail.com>wrote:
+.BI "\-X " option +Set implementation specific option.
Should probably be "Set the implementation-specific option."
Is there anyone respecting this notation? (I know pypy does not, it uses --jit and stuff)
IronPython does, for -X:Frames and a few others.
- Jeff
participants (9)
-
Alex Gaynor
-
Benjamin Peterson
-
Brett Cannon
-
Jeff Hardy
-
Maciej Fijalkowski
-
Nick Coghlan
-
R. David Murray
-
Steven D'Aprano
-
Victor Stinner