Skip to content

Commit 810414e

Browse files
committed
Added new builtins
1 parent bcb9a95 commit 810414e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CHANGES.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
Revision 2.6.1 (unknown):
22

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);
69

710
Revision 2.5.6 (2007-02-04):
811

python.vim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,14 @@ syn match pythonHexError "\<0[xX]\X\+[lL]\=\>" display
193193

194194
if exists("python_highlight_builtins") && python_highlight_builtins != 0
195195
" 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__
197198

198199
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
200201
syn keyword pythonBuiltinFunc chr classmethod cmp coerce compile complex
201202
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
203204
syn keyword pythonBuiltinFunc globals hasattr hash help hex id
204205
syn keyword pythonBuiltinFunc input int intern isinstance
205206
syn keyword pythonBuiltinFunc issubclass iter len list locals long map max
@@ -217,7 +218,7 @@ if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
217218
syn keyword pythonExClass Exception StandardError ArithmeticError
218219
syn keyword pythonExClass LookupError EnvironmentError
219220

220-
syn keyword pythonExClass AssertionError AttributeError EOFError
221+
syn keyword pythonExClass AssertionError AttributeError BufferError EOFError
221222
syn keyword pythonExClass FloatingPointError GeneratorExit IOError
222223
syn keyword pythonExClass ImportError IndexError KeyError
223224
syn keyword pythonExClass KeyboardInterrupt MemoryError NameError
@@ -230,7 +231,7 @@ if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
230231
syn keyword pythonExClass UnicodeTranslateError ValueError
231232
syn keyword pythonExClass WindowsError ZeroDivisionError
232233

233-
syn keyword pythonExClass Warning UserWarning DeprecationWarning
234+
syn keyword pythonExClass Warning UserWarning BytesWarning DeprecationWarning
234235
syn keyword pythonExClass PendingDepricationWarning SyntaxWarning
235236
syn keyword pythonExClass RuntimeWarning FutureWarning
236237
syn keyword pythonExClass ImportWarning UnicodeWarning

0 commit comments

Comments
 (0)