Browse Source

Added new builtins

Dmitry Vasiliev 15 years ago
parent
commit
810414e92c
2 changed files with 12 additions and 8 deletions
  1. 6
    3
      CHANGES.txt
  2. 6
    5
      python.vim

+ 6
- 3
CHANGES.txt View File

@@ -1,8 +1,11 @@
1 1
 Revision 2.6.1 (unknown):
2 2
 
3
-    - Added new builtin "next" introduced in Python 2.6;
4
-    - Added forgotten "__debug__" builtin;
5
-    - Removed OverflowWarning removed in Python 2.5;
3
+    - Added new builtins and exceptions introduced in Python 2.6: "bin",
4
+      "bytearray", "bytes", "format", "next", "BufferError", "BytesWarning";
5
+    - Added builtin "__debug__";
6
+    - Added "magic" global variables: "__doc__", "__file__", "__name__",
7
+      "__package__";
8
+    - Removed "OverflowWarning" (removed in Python 2.5);
6 9
 
7 10
 Revision 2.5.6 (2007-02-04):
8 11
 

+ 6
- 5
python.vim View File

@@ -193,13 +193,14 @@ syn match   pythonHexError	"\<0[xX]\X\+[lL]\=\>" display
193 193
 
194 194
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
195 195
   " Builtin functions, types and objects
196
-  syn keyword pythonBuiltinObj	True False Ellipsis None NotImplemented __debug__
196
+  syn keyword pythonBuiltinObj	True False Ellipsis None NotImplemented
197
+  syn keyword pythonBuiltinObj	__debug__ __doc__ __file__ __name__ __package__
197 198
 
198 199
   syn keyword pythonBuiltinFunc	__import__ abs all any apply
199
-  syn keyword pythonBuiltinFunc	basestring bool buffer callable
200
+  syn keyword pythonBuiltinFunc	basestring bin bool buffer bytearray bytes callable
200 201
   syn keyword pythonBuiltinFunc	chr classmethod cmp coerce compile complex
201 202
   syn keyword pythonBuiltinFunc	delattr dict dir divmod enumerate eval
202
-  syn keyword pythonBuiltinFunc	execfile file filter float frozenset getattr
203
+  syn keyword pythonBuiltinFunc	execfile file filter float format frozenset getattr
203 204
   syn keyword pythonBuiltinFunc	globals hasattr hash help hex id 
204 205
   syn keyword pythonBuiltinFunc	input int intern isinstance
205 206
   syn keyword pythonBuiltinFunc	issubclass iter len list locals long map max
@@ -217,7 +218,7 @@ if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
217 218
   syn keyword pythonExClass	Exception StandardError ArithmeticError
218 219
   syn keyword pythonExClass	LookupError EnvironmentError
219 220
 
220
-  syn keyword pythonExClass	AssertionError AttributeError EOFError
221
+  syn keyword pythonExClass	AssertionError AttributeError BufferError EOFError
221 222
   syn keyword pythonExClass	FloatingPointError GeneratorExit IOError
222 223
   syn keyword pythonExClass	ImportError IndexError KeyError
223 224
   syn keyword pythonExClass	KeyboardInterrupt MemoryError NameError
@@ -230,7 +231,7 @@ if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
230 231
   syn keyword pythonExClass	UnicodeTranslateError ValueError
231 232
   syn keyword pythonExClass	WindowsError ZeroDivisionError
232 233
 
233
-  syn keyword pythonExClass	Warning UserWarning DeprecationWarning
234
+  syn keyword pythonExClass	Warning UserWarning BytesWarning DeprecationWarning
234 235
   syn keyword pythonExClass	PendingDepricationWarning SyntaxWarning
235 236
   syn keyword pythonExClass	RuntimeWarning FutureWarning
236 237
   syn keyword pythonExClass	ImportWarning UnicodeWarning