diff Python/import.c @ 14038:18385172fac0 legacy-trunk

Apply SF patch #101135, adding 'import module as m' and 'from module import 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.
author Thomas Wouters <thomas@python.org>
date Thu, 17 Aug 2000 22:55:00 +0000
parents 4eaa463c031a
children f657dc8ff25e
line wrap: on
line diff
--- a/Python/import.c	Thu Aug 17 22:37:32 2000 +0000
+++ b/Python/import.c	Thu Aug 17 22:55:00 2000 +0000
@@ -66,7 +66,7 @@
 /* XXX Perhaps the magic number should be frozen and a version field
    added to the .pyc file header? */
 /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */
-#define MAGIC (50811 | ((long)'\r'<<16) | ((long)'\n'<<24))
+#define MAGIC (50815 | ((long)'\r'<<16) | ((long)'\n'<<24))
 
 /* Magic word as global; note that _PyImport_Init() can change the
    value of this global to accommodate for alterations of how the