<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/main.c, branch v2.2a3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/main.c?h=v2.2a3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/main.c?h=v2.2a3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-09-04T03:51:09Z</updated>
<entry>
<title>PEP 238 documented -Qwarn as warning only for classic int or long</title>
<updated>2001-09-04T03:51:09Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-04T03:51:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2'/>
<id>urn:sha1:1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2</id>
<content type='text'>
division, and this makes sense.  Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
</content>
</entry>
<entry>
<title>Rename the -D option to -Q, to avoid a Jython option name conflict.</title>
<updated>2001-09-04T03:26:15Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-04T03:26:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61c345fa37573005b708d239c0911218ca22383c'/>
<id>urn:sha1:61c345fa37573005b708d239c0911218ca22383c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Oops.  The -W option takes args, not -X.</title>
<updated>2001-08-31T18:17:13Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-31T18:17:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=97741a30414c41e314950844bebee3230e9d813d'/>
<id>urn:sha1:97741a30414c41e314950844bebee3230e9d813d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add warning mode for classic division, almost exactly as specified in</title>
<updated>2001-08-31T17:40:15Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-31T17:40:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=393661d15fa76ec46e9f7b71e97bf2ed38470620'/>
<id>urn:sha1:393661d15fa76ec46e9f7b71e97bf2ed38470620</id>
<content type='text'>
PEP 238.  Changes:

- add a new flag variable Py_DivisionWarningFlag, declared in
  pydebug.h, defined in object.c, set in main.c, and used in
  {int,long,float,complex}object.c.  When this flag is set, the
  classic division operator issues a DeprecationWarning message.

- add a new API PyRun_SimpleStringFlags() to match
  PyRun_SimpleString().  The main() function calls this so that
  commands run with -c can also benefit from -Dnew.

- While I was at it, I changed the usage message in main() somewhat:
  alphabetized the options, split it in *four* parts to fit in under
  512 bytes (not that I still believe this is necessary -- doc strings
  elsewhere are much longer), and perhaps most visibly, don't display
  the full list of options on each command line error.  Instead, the
  full list is only displayed when -h is used, and otherwise a brief
  reminder of -h is displayed.  When -h is used, write to stdout so
  that you can do `python -h | more'.

Notes:

- I don't want to use the -W option to control whether the classic
  division warning is issued or not, because the machinery to decide
  whether to display the warning or not is very expensive (it involves
  calling into the warnings.py module).  You can use -Werror to turn
  the warnings into exceptions though.

- The -Dnew option doesn't select future division for all of the
  program -- only for the __main__ module.  I don't know if I'll ever
  change this -- it would require changes to the .pyc file magic
  number to do it right, and a more global notion of compiler flags.

- You can usefully combine -Dwarn and -Dnew: this gives the __main__
  module new division, and warns about classic division everywhere
  else.
</content>
</entry>
<entry>
<title>Add -E command line switch (ignore environment variables like PYTHONHOME</title>
<updated>2001-07-23T16:30:27Z</updated>
<author>
<name>Neil Schemenauer</name>
<email>nascheme@enme.ucalgary.ca</email>
</author>
<published>2001-07-23T16:30:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5'/>
<id>urn:sha1:7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5</id>
<content type='text'>
and PYTHONPATH).
</content>
</entry>
<entry>
<title>Add "help" to the things one is encouraged to type for more</title>
<updated>2001-07-18T16:59:46Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-18T16:59:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=36002d7af1a9971c62e982cbbb1d1ce34610129d'/>
<id>urn:sha1:36002d7af1a9971c62e982cbbb1d1ce34610129d</id>
<content type='text'>
information.  (I found this idea in the ActivePython 2.1 diffs.)
</content>
</entry>
<entry>
<title>Part way to allowing "from __future__ import generators" to communicate</title>
<updated>2001-07-16T02:29:45Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-07-16T02:29:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ba58662817b708a453020f0425fe4747ea6d5cb'/>
<id>urn:sha1:5ba58662817b708a453020f0425fe4747ea6d5cb</id>
<content type='text'>
that info to code dynamically compiled *by* code compiled with generators
enabled.  Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags.  Perhaps I should not have?  I doubted it was
*intended* to be part of the public API, so just did.
</content>
</entry>
<entry>
<title>Removed the Python version from the PYTHONHOMEHELP string. It was</title>
<updated>2001-06-12T16:13:51Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-06-12T16:13:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=da4dbc36c102d5005737365f65627bbca1d2395b'/>
<id>urn:sha1:da4dbc36c102d5005737365f65627bbca1d2395b</id>
<content type='text'>
still set to python2.0 ...
</content>
</entry>
<entry>
<title>Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger</title>
<updated>2001-04-10T22:07:43Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-10T22:07:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bceccf5f43b51d166951ea97cff086c8828b745b'/>
<id>urn:sha1:bceccf5f43b51d166951ea97cff086c8828b745b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Extend support for from __future__ import nested_scopes</title>
<updated>2001-03-22T02:47:58Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-22T02:47:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bc32024769eecd3c2251e00850e6a5c003aa9253'/>
<id>urn:sha1:bc32024769eecd3c2251e00850e6a5c003aa9253</id>
<content type='text'>
If a module has a future statement enabling nested scopes, they are
also enable for the exec statement and the functions compile() and
execfile() if they occur in the module.

If Python is run with the -i option, which enters interactive mode
after executing a script, and the script it runs enables nested
scopes, they are also enabled in interactive mode.

XXX The use of -i with -c "from __future__ import nested_scopes" is
not supported.  What's the point?

To support these changes, many function variants have been added to
pythonrun.c.  All the variants names end with Flags and they take an
extra PyCompilerFlags * argument.  It is possible that this complexity
will be eliminated in a future version of the interpreter in which
nested scopes are not optional.
</content>
</entry>
</feed>
