- 30 Tem, 2001 4 kayıt (commit)
-
-
Jeremy Hylton yazdı
Namely, an exception is raised if the second arg to hasattr() is not a string or Unicode.
-
Jeremy Hylton yazdı
Fix suggested by Michael Hudson: Raise TypeError if attribute name passed to getattr() is not a string or Unicode. There is some unfortunate duplication of code between builtin_getattr() and PyObject_GetAttr(), but it appears to be unavoidable.
-
Jeremy Hylton yazdı
And remove all the extern decls in the middle of .c files. Apparently, it was excluded from the header file because it is intended for internal use by the interpreter. It's still intended for internal use and documented as such in the header file.
-
Jeremy Hylton yazdı
If the code object has free variables, raise TypeError.
-
- 26 Tem, 2001 3 kayıt (commit)
-
-
Tim Peters yazdı
-
Marc-André Lemburg yazdı
surrogates for Unicode code points outside range(0x10000) on narrow Python builds.
-
Martin v. Löwis yazdı
-
- 23 Tem, 2001 3 kayıt (commit)
-
-
Neil Schemenauer yazdı
and PYTHONPATH).
-
Moshe Zadka yazdı
fault in sys.displayhook. Please check this in on the 2.2a1 branch (or whatever is necessary to get it working next release)
-
Guido van Rossum yazdı
exception in the execution of bar, ensure that foo.bar exists. (Previously, while sys.modules['foo.bar'] would exist, foo.bar would only be created upon successful execution of bar. This is inconvenient; some would say wrong. :-)
-
- 19 Tem, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
SF patch #436376.
-
- 18 Tem, 2001 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
Add dlopenflags to PyInterpreterState, and use it in dlopen calls.
-
- 17 Tem, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 16 Tem, 2001 5 kayıt (commit)
-
-
Guido van Rossum yazdı
compiling struct.
-
Guido van Rossum yazdı
PyParser_SimpleParseString(). Now calls PyParser_SimpleParseStringFlags() with the correct flag.
-
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ı
pythonrun.c, run_pyc_file(): repair semantic error wrt CO_GENERATOR vs CO_GENERATOR_ALLOWED.
-
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.
-
- 15 Tem, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
the yield statement. I figure we have to have this in before I can release 2.2a1 on Wednesday. Note: test_generators is currently broken, I'm counting on Tim to fix this.
-
- 12 Tem, 2001 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 09 Tem, 2001 1 kayıt (commit)
-
-
Thomas Wouters yazdı
on python-dev. The features will still vanish, however, just one release later.
-
- 05 Tem, 2001 2 kayıt (commit)
-
-
Guido van Rossum yazdı
fewer arguments.
-
Tim Peters yazdı
Probable fix (the bug report doesn't have enough info to say for sure). find_init_module(): Insist on a case-sensitive match for __init__ files. Given __INIT__.PY instead, find_init_module() thought that was fine, but the later attempt to do find_module("__INIT__.PY") didn't and its caller silently suppressed the resulting ImportError. Now find_init_module() refuses to accept __INIT__.PY to begin with. Bugfix candidate; specific to platforms with case-insensitive filesystems.
-
- 03 Tem, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
path (with no profile/trace function) through eval_code2() and eval_frame() avoids several checks. In the common cases of calls, returns, and exception propogation, eval_code2() and eval_frame() used to test two values in the thread-state: the profiling function and the tracing function. With this change, a flag is set in the thread-state if either of these is active, allowing a single check to suffice when both are NULL. This also simplifies the code needed when either function is in use but is already active (to avoid profiling/tracing the profiler/tracer); the flag is set to 0 when the profile/trace code is entered, allowing the same check to suffice for "already in the tracer" for call/return/ exception events.
-
- 28 Haz, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
"return expr" instances in generators (which latter may be generators due to otherwise invisible "yield" stmts hiding in "if 0" blocks). This was fun the first time, but this has gotten truly ugly now.
-
- 27 Haz, 2001 3 kayıt (commit)
-
-
Fred Drake yazdı
Python interpreter. This change adds two new C-level APIs: PyEval_SetProfile() and PyEval_SetTrace(). These can be used to install profile and trace functions implemented in C, which can operate at much higher speeds than Python-based functions. The overhead for calling a C-based profile function is a very small fraction of a percent of the overhead involved in calling a Python-based function. The machinery required to call a Python-based profile or trace function been moved to sysmodule.c, where sys.setprofile() and sys.setprofile() simply become users of the new interface. As a side effect, SF bug #436058 is fixed; there is no longer a _PyTrace_Init() function to declare.
-
Fredrik Lundh yazdı
tests.
-
Martin v. Löwis yazdı
Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
-
- 26 Haz, 2001 7 kayıt (commit)
-
-
Guido van Rossum yazdı
- the correct range for the error message is range(0x110000); - put the 4-byte Unicode-size code inside the same else branch as the 2-byte code, rather generating unreachable code in the 2-byte case. - Don't hide the 'else' behine the '}'. (I would prefer that in 4-byte mode, any value should be accepted, but reasonable people can argue about that, so I'll put that off.)
-
Tim Peters yazdı
not writable -- too dangerous!) from Python code.
-
Martin v. Löwis yazdı
Add configure option --enable-unicode. Add config.h macros Py_USING_UNICODE, PY_UNICODE_TYPE, Py_UNICODE_SIZE, SIZEOF_WCHAR_T. Define Py_UCS2. Encode and decode large UTF-8 characters into single Py_UNICODE values for wide Unicode types; likewise for UTF-16. Remove test whether sizeof Py_UNICODE is two.
-
Tim Peters yazdı
Makes it much easier to find references via dumb editor search (former "frame" in particular was near-hopeless).
-
Fredrik Lundh yazdı
wrt surrogates. (this extends the valid range from 65535 to 1114111)
-
Fredrik Lundh yazdı
HAVE_USABLE_WCHAR_T
-
Tim Peters yazdı
Not anymore <wink>. Pure hack. Doesn't fix any other "if 0:" glitches.
-
- 23 Haz, 2001 4 kayıt (commit)
-
-
Tim Peters yazdı
Iterators list and Python-Dev; e.g., these all pass now: def g1(): try: return except: yield 1 assert list(g1()) == [] def g2(): try: return finally: yield 1 assert list(g2()) == [1] def g3(): for i in range(3): yield None yield None assert list(g3()) == [None] * 4 compile.c: compile_funcdef and com_return_stmt: Just van Rossum's patch to compile the same code for "return" regardless of function type (this goes back to the previous scheme of returning Py_None). ceval.c: gen_iternext: take a return (but not a yield) of Py_None as meaning the generator is exhausted.
-
Tim Peters yazdı
not NULL. I don't think it can be NULL from Python code, but if using generators via the C API I expect a NULL frame is possible.
-
Tim Peters yazdı
the next free valuestack slot, not to the base (in America, stacks push and pop at the top -- they mutate at the bottom in Australia <winK>). eval_frame(): assert that f_stacktop isn't NULL upon entry. frame_delloc(): avoid ordered pointer comparisons involving f_stacktop when f_stacktop is NULL.
-
Tim Peters yazdı
Derived from Thomas Wouters's patch on the Iterators list, but doesn't try to read c->c_block[c->c_nblocks].
-
- 21 Haz, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
giving up the goods. NEEDS DOC CHANGES
-