PageRenderTime 28ms CodeModel.GetById 23ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Lib/python/pythonkw.swg

#
Unknown | 136 lines | 124 code | 12 blank | 0 comment | 0 complexity | 0089253c181c439a2c32fd849e89bef0 MD5 | raw file
  1/*
  2  Warnings for Python keywords, built-in names and bad names.
  3*/
  4
  5#define PYTHONKW(x) %keywordwarn("'" `x` "' is a python keyword, renaming to '_" `x` "'", rename="_%s")  `x`
  6#define PYTHONBN(x) %builtinwarn("'" `x` "' conflicts with a built-in name in python")  `x`
  7
  8
  9/*
 10  Warnings for Python keywords 
 11  http://www.fnorb.org/docs/1.2/Fnorb-Guide/node62.html
 12*/
 13
 14PYTHONKW(and);
 15PYTHONKW(assert);
 16PYTHONKW(break);
 17PYTHONKW(class);
 18PYTHONKW(continue);
 19PYTHONKW(def);
 20PYTHONKW(del);
 21PYTHONKW(elif);
 22PYTHONKW(else);
 23PYTHONKW(except);
 24PYTHONKW(exec);
 25PYTHONKW(finally);
 26PYTHONKW(for);
 27PYTHONKW(from);
 28PYTHONKW(global);
 29PYTHONKW(if);
 30PYTHONKW(import);
 31PYTHONKW(in);
 32PYTHONKW(is);
 33PYTHONKW(lambda);
 34PYTHONKW(not);
 35PYTHONKW(or);
 36PYTHONKW(pass);
 37PYTHONKW(print);
 38PYTHONKW(raise);
 39PYTHONKW(return);
 40PYTHONKW(try);
 41PYTHONKW(while);
 42PYTHONKW(yield);
 43
 44/*
 45  built-in functions
 46  http://www.zvon.org/other/python/doc21/lib/built-in-funcs.html
 47 */ 
 48
 49PYTHONBN(abs);
 50PYTHONBN(apply);
 51PYTHONBN(bool);
 52PYTHONBN(buffer);
 53PYTHONBN(callable);
 54PYTHONBN(chr);
 55PYTHONBN(classmethod);
 56PYTHONBN(cmp);
 57PYTHONBN(coerce);
 58PYTHONBN(compile);
 59PYTHONBN(complex);
 60PYTHONBN(delattr);
 61PYTHONBN(dict);
 62PYTHONBN(dir);
 63PYTHONBN(divmod);
 64PYTHONBN(enumerate);
 65PYTHONBN(eval);
 66PYTHONBN(execfile);
 67PYTHONBN(file);
 68PYTHONBN(filter);
 69PYTHONBN(float);
 70PYTHONBN(frozenset);
 71PYTHONBN(getattr);
 72PYTHONBN(globals);
 73PYTHONBN(hasattr);
 74PYTHONBN(hash);
 75PYTHONBN(hex);
 76PYTHONBN(id);
 77PYTHONBN(input);
 78PYTHONBN(int);
 79PYTHONBN(intern);
 80PYTHONBN(isinstance);
 81PYTHONBN(issubclass);
 82PYTHONBN(iter);
 83PYTHONBN(len);
 84PYTHONBN(list);
 85PYTHONBN(locals);
 86PYTHONBN(long);
 87PYTHONBN(map);
 88PYTHONBN(max);
 89PYTHONBN(min);
 90PYTHONBN(object);
 91PYTHONBN(oct);
 92PYTHONBN(open);
 93PYTHONBN(ord);
 94PYTHONBN(pow);
 95PYTHONBN(property);
 96PYTHONBN(range);
 97PYTHONBN(raw_input);
 98PYTHONBN(reduce);
 99PYTHONBN(reload);
100PYTHONBN(repr);
101PYTHONBN(reversed);
102PYTHONBN(round);
103PYTHONBN(set);
104PYTHONBN(setattr);
105PYTHONBN(slice);
106PYTHONBN(sorted);
107PYTHONBN(staticmethod);
108PYTHONBN(str);
109PYTHONBN(sum);
110PYTHONBN(super);
111PYTHONBN(tuple);
112PYTHONBN(type);
113PYTHONBN(unichr);
114PYTHONBN(unicode);
115PYTHONBN(vars);
116PYTHONBN(xrange);
117PYTHONBN(zip);
118
119
120/* 
121   built-in names
122   boolean type and None
123*/
124PYTHONBN(True);
125PYTHONBN(False);
126
127PYTHONKW(None);
128
129
130/* 
131   'self' is also a bad Name
132*/
133PYTHONBN(self);
134
135#undef PYTHONBN
136#undef PYTHONKW