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.
This commit is contained in:
Thomas Wouters 2000-08-17 22:55:00 +00:00
parent 1d75a79c00
commit 5215225ea1
12 changed files with 970 additions and 818 deletions

View file

@ -19,43 +19,45 @@
#define return_stmt 274
#define raise_stmt 275
#define import_stmt 276
#define dotted_name 277
#define global_stmt 278
#define exec_stmt 279
#define assert_stmt 280
#define compound_stmt 281
#define if_stmt 282
#define while_stmt 283
#define for_stmt 284
#define try_stmt 285
#define except_clause 286
#define suite 287
#define test 288
#define and_test 289
#define not_test 290
#define comparison 291
#define comp_op 292
#define expr 293
#define xor_expr 294
#define and_expr 295
#define shift_expr 296
#define arith_expr 297
#define term 298
#define factor 299
#define power 300
#define atom 301
#define listmaker 302
#define lambdef 303
#define trailer 304
#define subscriptlist 305
#define subscript 306
#define sliceop 307
#define exprlist 308
#define testlist 309
#define dictmaker 310
#define classdef 311
#define arglist 312
#define argument 313
#define list_iter 314
#define list_for 315
#define list_if 316
#define import_as_name 277
#define dotted_as_name 278
#define dotted_name 279
#define global_stmt 280
#define exec_stmt 281
#define assert_stmt 282
#define compound_stmt 283
#define if_stmt 284
#define while_stmt 285
#define for_stmt 286
#define try_stmt 287
#define except_clause 288
#define suite 289
#define test 290
#define and_test 291
#define not_test 292
#define comparison 293
#define comp_op 294
#define expr 295
#define xor_expr 296
#define and_expr 297
#define shift_expr 298
#define arith_expr 299
#define term 300
#define factor 301
#define power 302
#define atom 303
#define listmaker 304
#define lambdef 305
#define trailer 306
#define subscriptlist 307
#define subscript 308
#define sliceop 309
#define exprlist 310
#define testlist 311
#define dictmaker 312
#define classdef 313
#define arglist 314
#define argument 315
#define list_iter 316
#define list_for 317
#define list_if 318

View file

@ -65,7 +65,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#define LOAD_LOCALS 82
#define RETURN_VALUE 83
#define IMPORT_STAR 84
#define EXEC_STMT 85
#define POP_BLOCK 87