| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
in extended prints should only be evaluated once. This patch plays
stack games (documented!) to fix this.
|
|
|
|
| |
opcode additions.
|
|
|
|
|
|
|
| |
eval_code2(): Implement new bytecodes PRINT_ITEM_TO and
PRINT_NEWLINE_TO, as per accepted SF patch #100970.
Also update graminit.c based on related Grammar/Grammar changes.
|
|
|
|
|
|
| |
com_print_stmt(): Implement recognition of, and byte compilation for,
extended print using new byte codes PRINT_ITEM_TO and
PRINT_NEWLINE_TO.
|
|
|
|
|
|
|
|
|
|
| |
trying hard enough to find out what the arguments to an import were. There
is no test-case for this bug, yet, but this is what it looked like:
from encodings import cp1006, cp1026
ImportError: cannot import name cp1026
'__import__' was called with only the first name in the 'arguments' list.
|
|
|
|
|
|
|
|
|
|
| |
load mod.submod as m, or mod as m ? Both can be achieved differently, and
unambiguously. Also attempt to document this restriction (editor
appreciated!)
Note that this is an artificial check during compile, because incorporating
this in the grammar is hard, and then adjusting the compiler to do the right
thing with the right nodes is harder.
|
| |
|
| |
|
|
|
|
| |
thus preserving the first one that has been raised.
|
| |
|
|
|
|
|
|
| |
scope. Previously, s_buffer[] was defined inside the
PyUnicode_Check() scope, but referred to in the outer scope via
assignment to s. This quiets an Insure portability warning.
|
|
|
|
|
|
|
|
| |
name as n'. By doing some twists and turns, "as" is not a reserved word.
There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
|
|
|
|
| |
created from the "big"/"little" constant needs to be decref'd.
|
|
|
|
|
|
|
| |
First, the allocated buffer was never freed after using it to create
the PyString object. Second, it was possible that have_filename would
be false (meaning that filename was not a PyString object), but that
the code would still try to PyString_GET_SIZE() it.
|
|
|
|
|
|
| |
in binascii.c (only on platforms with signed chars -- although Py_CHARMASK
is documented as returning an int, it only does so on platforms with
signed chars).
|
|
|
|
|
|
|
|
| |
returning a pointer to the start of the file's "base" name;
similar to os.path.basename().
SyntaxError__str__(): Use my_basename() to keep the length of the
file name included in the exception message short.
|
|
|
|
| |
my last set of changes.
|
|
|
|
|
|
|
|
|
|
| |
filename and lineno attributes, but do not mask the SyntaxError if we
fail.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
Wrap a long line to fit in under 80 columns.
|
|
|
|
|
|
|
|
| |
filename and lineno attributes, but do not mask the SyntaxError if we
fail.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
|
|
|
|
|
|
|
|
|
| |
than depending on the site that raises the exception. If the
filename and lineno attributes are set on the exception object,
use them to augment the message displayed.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
|
| |
|
|
|
|
| |
the previous exceptions.py have WindowsError as a sub-class of OSError.
|
|
|
|
|
|
| |
string literals has not been tested on an MS_WIN16 platform; the trailing
";" was inside the #ifndef MS_WIN16, which should cause an error (missing
semi-colon) when compiled with that symbol #defined.
|
|
|
|
| |
big-endian machines and "little" for little-endian machines.
|
|
|
|
|
| |
node, without checking if the node actually had more than one child. It can
have only one node, though: '[' test ']'. This fixes it.
|
|
|
|
| |
re-introducing com_assign_list, now unused. Removed it.
|
|
|
|
|
| |
return value to int is safe here because in each case it previouls checked that
there will be no overflow.
|
|
|
|
|
|
| |
http://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470
for details.
|
|
|
|
|
|
|
| |
did the same anyway.
I'm not sure what to do with Tools/compiler/compiler/* -- that isn't part of
distutils, is it ? Should it try to be compatible with old bytecode version ?
|
|
|
|
| |
with uintptr_t (fix MSVC 5.0 build)
|
|
|
|
|
| |
PyNode_Compile()), make sure that an exception is actually set --
otherwise someone stomped on our error. [2.0 checkin of this fix.]
|
|
|
|
| |
an exception set. This shouldn't happen, but we see it at times...
|
| |
|
|
|
|
| |
weeks.
|
|
|
|
|
|
| |
-32768..65535 is acceptable. Added B specifier (with values from
-128..255). No L added (which would have completed the set) because l
already accepts any value (and the letter L is taken for quadwords).
|
| |
|
|
|
|
|
|
|
| |
python-dev discussion.
This should catch future version incompatibilities on Windows. Alas,
this doesn't help for 1.5 vs. 1.6; but it will help for 1.6 vs. 2.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the Python Unicode implementation.
The internal buffer used for implementing the buffer protocol
is renamed to defenc to make this change visible. It now holds the
default encoded version of the Unicode object and is calculated
on demand (NULL otherwise).
Since the default encoding defaults to ASCII, this will mean that
Unicode objects which hold non-ASCII characters will no longer
work on C APIs using the "s" or "t" parser markers. C APIs must now
explicitly provide Unicode support via the "u", "U" or "es"/"es#"
parser markers in order to work with non-ASCII Unicode strings.
(Note: this patch will also have to be applied to the 1.6 branch
of the CVS tree.)
|
|
|
|
|
| |
This is a notice without a date, which apparently is not a claim to
copyright but only advice to the reader. IANAL. :-)
|
|
|
|
|
|
|
|
|
|
|
| |
accepted by the BDFL.
builtin_zip(): New function to implement the zip() function described
in the above proposal.
zip_doc[]: Docstring for zip().
builtin_methods[]: added entry for zip()
|
|
|
|
| |
that sys.version_info will be built properly.
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
| |
Leave the actual #define in for API compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
good C practice hasn't been available to everything all along.
Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this
just casts VALUE from type WIDE to type NARROW, but assert-fails if
Py_DEBUG is defined and info is lost due to casting.
Replaced a line in Fredrik's fix to marshal.c to use the new macro.
|
|
|
|
| |
(this is what the callers expect).
|
|
|
|
|
|
| |
MAGIC number. When updating it next time, be sure it's higher than 50715 *
constants. (Shouldn't be a problem if everyone keeps to the proper
algorithm.)
|