DB
ignore_missing_imports = True
и сигнатура меняется на Any AnySize: a a a
DB
ignore_missing_imports = True
и сигнатура меняется на Any AnyMK
ignore_missing_imports = True
и сигнатура меняется на Any AnyMK
MK
MK
MK
E
$ poetry self update
RuntimeError
Poetry was not installed with the recommended installer. Cannot update automatically.
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
MK
MK
E
Б
spam
. Смущает тысяча else break continue
for bar in foo:
for spam in bar:
if spam:
break
else:
continue
break
else:
spam = 'no spam :('
print(spam)
Б
p
Б
def find_spam(foo):
for bar in foo:
for spam in bar:
if spam:
return spam
else:
return 'no spam :('
S
spam
. Смущает тысяча else break continue
for bar in foo:
for spam in bar:
if spam:
break
else:
continue
break
else:
spam = 'no spam :('
print(spam)
>>> a = [['a', 'b'], ['c', 'd'], ['e']]
>>> print(any('d' in l for l in a))
True
>>> a = [['a', 'b'], ['c', 'f'], ['e']]
>>> print(any('d' in l for l in a))
False
Б
>>> a = [['a', 'b'], ['c', 'd'], ['e']]
>>> print(any('d' in l for l in a))
True
>>> a = [['a', 'b'], ['c', 'f'], ['e']]
>>> print(any('d' in l for l in a))
False
ED
>>> a = [['a', 'b'], ['c', 'd'], ['e']]
>>> print(any('d' in l for l in a))
True
>>> a = [['a', 'b'], ['c', 'f'], ['e']]
>>> print(any('d' in l for l in a))
False
in
классный оператор.S
in
bar на любой предикатБ
>>> a = [['a', 'b'], ['c', 'd'], ['e']]
>>> print(any('d' in l for l in a))
True
>>> a = [['a', 'b'], ['c', 'f'], ['e']]
>>> print(any('d' in l for l in a))
False
Б
in
bar на любой предикат