- 13 Şub, 2003 1 kayıt (commit)
-
-
Guido van Rossum yazdı
with an indented code block but no newline would raise SyntaxError. This would have been a four-line change in parsetok.c... Except codeop.py depends on this behavior, so a compilation flag had to be invented that causes the tokenizer to revert to the old behavior; this required extra changes to 2 .h files, 2 .c files, and 2 .py files. (Fixes SF bug #501622.)
-
- 10 Şub, 2003 1 kayıt (commit)
-
-
Just van Rossum yazdı
Incorporated nnorwitz's comment re. Py__USING_UNICODE.
-
- 01 Ock, 2003 1 kayıt (commit)
-
-
Neal Norwitz yazdı
functions are here. Suggested by Skip.
-
- 31 Ara, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 30 Ara, 2002 2 kayıt (commit)
-
-
Neal Norwitz yazdı
Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
-
Just van Rossum yazdı
- new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.
-
- 11 Ara, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 26 Eki, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 12 Agu, 2002 2 kayıt (commit)
-
-
Mark Hammond yazdı
-
Mark Hammond yazdı
Thanks to Skip Montanaro and Kalle Svensson for the patches.
-
- 02 Agu, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
-
- 29 Tem, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
also adds 'extern' to PyAPI_DATA rather than at each declaration, as discussed with Tim and Guido.
-
- 09 Tem, 2002 1 kayıt (commit)
-
-
Thomas Heller yazdı
-
- 12 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 31 Agu, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
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.
-
- 17 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
CO_FUTURE_DIVISION flag. Redid this to use Jeremy's PyCF_MASK #define instead, so we dont have to remember to fiddle individual feature names here again. pythonrun.h: Also #define a PyCF_MASK_OBSOLETE mask. This isn't used yet, but will be as part of the PEP 264 implementation (compile() mustn't raise an error just because old code uses a flag name that's become obsolete; a warning may be appropriate, but not an error; so compile() has to know about obsolete flags too, but nobody is going to remember to update compile() with individual obsolete flag names across releases either -- i.e., this is the flip side of PyEval_MergeCompilerFlags's oversight).
-
- 10 Agu, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Replace individual slots in PyFutureFeatures with a single bitmask with one field per feature. The flags for this bitmask are the same as the flags used in the co_flags slot of a code object. XXX This means we waste several bits, because they are used for co_flags but have no meaning for future statements. Don't think this is an issue. Remove the NESTED_SCOPES_DEFAULT define and others. Not sure what they were for anyway. Remove all the PyCF_xxx flags, but define PyCF_MASK in terms of the CO_xxx flags that are relevant for this release. Change definition of PyCompilerFlags so that cf_flags matches co_flags.
-
- 08 Agu, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This introduces: - A new operator // that means floor division (the kind of division where 1/2 is 0). - The "future division" statement ("from __future__ import division) which changes the meaning of the / operator to implement "true division" (where 1/2 is 0.5). - New overloadable operators __truediv__ and __floordiv__. - New slots in the PyNumberMethods struct for true and floor division, new abstract APIs for them, new opcodes, and so on. I emphasize that without the future division statement, the semantics of / will remain unchanged until Python 3.0. Not yet implemented are warnings (default off) when / is used with int or long arguments. This has been on display since 7/31 as SF patch #443474. Flames to /dev/null.
-
- 02 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 16 Tem, 2001 2 kayıt (commit)
-
-
Tim Peters yazdı
that 'yield' is a keyword. This doesn't help test_generators at all! I don't know why not. These things do work now (and didn't before this patch): 1. "from __future__ import generators" now works in a native shell. 2. Similarly "python -i xxx.py" now has generators enabled in the shell if xxx.py had them enabled. 3. This program (which was my doctest proxy) works fine: from __future__ import generators source = """\ def f(): yield 1 """ exec compile(source, "", "single") in globals() print type(f())
-
Tim Peters yazdı
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.
-
- 23 Mar, 2001 1 kayıt (commit)
-
-
Ka-Ping Yee yazdı
Update docstring and library reference section on 'sys' module. New API PyErr_Display, just for displaying errors, called by excepthook. Uncaught exceptions now call sys.excepthook; if that fails, we fall back to calling PyErr_Display directly. Also comes with sys.__excepthook__ and sys.__displayhook__.
-
- 22 Mar, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
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.
-
- 01 Mar, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
(Also remove warning about module-level global decl, because we can't distinguish from code passed to exec.) Define PyCompilerFlags type contains a single element, cf_nested_scopes, that is true if a nested scopes future statement has been entered at the interactive prompt. New API functions: PyNode_CompileFlags() PyRun_InteractiveOneFlags() -- same as their non Flags counterparts except that the take an optional PyCompilerFlags pointer compile.c: In jcompile() use PyCompilerFlags argument. If cf_nested_scopes is true, compile code with nested scopes. If it is false, but the code has a valid future nested scopes statement, set it to true. pythonrun.c: Create a new PyCompilerFlags object in PyRun_InteractiveLoop() and thread it through to PyRun_InteractiveOneFlags().
-
- 02 Şub, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
symtable.h, so that they can be used by external module. Improve error handling in symtable_enter_scope(), which return an error code that went unchecked by most callers. XXX The error handling in symtable code is sloppy in general. Modify symtable to record the line number that begins each scope. This can help to identify which code block is being referred to when multiple blocks are bound to the same name. Add st_scopes dict that is used to preserve scope info when PyNode_CompileSymtable() is called. Otherwise, this information is tossed as soon as it is no longer needed. Add Py_SymtableString() to pythonrun; analogous to Py_CompileString().
-
- 11 Eki, 2000 1 kayıt (commit)
-
-
Trent Mick yazdı
on Win64. This closes bug http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=116516
-
- 16 Eyl, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
PyOS_setsig().
-
- 01 Eyl, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This should match the situation in the 1.6b1 tree.
-
- 27 Agu, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
PyRun_FileEx(). These are the same as their non-Ex counterparts but have an extra argument, a flag telling them to close the file when done. Then this is used by Py_Main() and execfile() to close the file after it is parsed but before it is executed. Adding APIs seems strange given the feature freeze but it's the only way I see to close the bug report without incompatible changes. [ Bug #110616 ] source file stays open after parsing is done (PR#209)
-
Fredrik Lundh yazdı
couple of potential stack overflows, including bug #110615. closes patch #101238
-
- 07 Agu, 2000 1 kayıt (commit)
-
-
Jack Jansen yazdı
-
- 09 Tem, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 30 Haz, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 26 Haz, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 25 May, 2000 1 kayıt (commit)
-
-
Barry Warsaw yazdı
or fini of the builtin module. _PyBuiltin_Init_1 => _PyBuiltin_Init _PyBuiltin_Init_2 removed _PyBuiltin_Fini_1 removed _PyBuiltin_Fini_2 removed These functions are used to initialize the _exceptions module. init_exceptions added fini_exceptions added
-
- 04 Ara, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 06 Şub, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
embedders to force a different PYTHONHOME. - Add new interface PyErr_PrintEx(flag); same as PyErr_Print() but flag determines whether sys.last_* are set or not. PyErr_Print() now simply calls PyErr_PrintEx(1).
-
- 29 Agu, 1997 1 kayıt (commit)
-
-
Barry Warsaw yazdı
for the built-in module.
-
- 22 Agu, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-