In which Python version was feature X introduced?
- Last edited on Feb 3, 2017, 11:15:59 AM by Antti Haapala -- Слава Україні
Python 0.x
exec
function
Python 1.0
exec
statement,exec
compatibility syntax
Python 2.0
- list comprehensions
Python 2.1
Python 2.2
- lexical scoping
from __future__ import division
,//
- new-style classes
Python 2.3
bool
,True
andFalse
asbool
s- the
datetime
module
Python 2.4
Python 2.5
with
statement; usable withfrom __future__ import with_statement
set
,frozenset
Python 2.6
json
with
without__future__
imports__future__
imports:absolute_import
,unicode_literals
,print_function
b''
prefix,bytes
Python 2.7
- set literals
{1, 2, 3}
- set comprehensions, dict comprehensions
Python 3.0
- PEP 3132 - Extended iterable unpacking
bytes
,str
distinction
Python 3.3
u''
prefixed unicode literals reintroduced
Python 3.4
enum.Enum
Python 3.5
async def
,await
etc.
Python 3.6
f'{format} strings'
- asynchronous generator expressions