Pragmatic directives: Difference between revisions
Content added Content deleted
m (→{{header|Perl}}: Mod headings.) |
(→{{header|Perl}}: Add Python __future__) |
||
Line 33: | Line 33: | ||
<lang perl>no warnings; # disable warnings pragma module |
<lang perl>no warnings; # disable warnings pragma module |
||
no strict; # disable strict pragma module</lang> |
no strict; # disable strict pragma module</lang> |
||
=={{header|Python}}== |
|||
Python has the [http://docs.python.org/py3k/library/__future__.html __future__] module which controls certain features: |
|||
;Python 3.2: |
|||
<lang python>Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win32 |
|||
Type "copyright", "credits" or "license()" for more information. |
|||
>>> import __future__ |
|||
>>> __future__.all_feature_names |
|||
['nested_scopes', 'generators', 'division', 'absolute_import', 'with_statement', 'print_function', 'unicode_literals', 'barry_as_FLUFL'] |
|||
>>> </lang> |
|||
('barry_as_FLUFL' is an April fools [http://www.python.org/dev/peps/pep-0401/ joke]) |
|||
;Python 2.7: |
|||
<lang python>Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 |
|||
Type "copyright", "credits" or "license()" for more information. |
|||
>>> import __future__ |
|||
>>> __future__.all_feature_names |
|||
['nested_scopes', 'generators', 'division', 'absolute_import', 'with_statement', 'print_function', 'unicode_literals'] |
|||
>>> </lang> |
|||
{{omit from|Tcl}} |
{{omit from|Tcl}} |