##// END OF EJS Templates
Generate fontweight enum values without an extraneous variable from a comprehension...
Generate fontweight enum values without an extraneous variable from a comprehension In python 2, the comprehension will create a new class attribute, i. Using a map will not create the extra local variable.

File last commit:

r13582:b21d447e
r19836:dfd3d3f4
Show More
_dummy.py
29 lines | 578 B | text/x-python | PythonLexer
#-----------------------------------------------------------------------------
# Copyright (C) 2013 Min RK
#
# Distributed under the terms of the 2-clause BSD License.
#-----------------------------------------------------------------------------
from contextlib import contextmanager
def beginActivityWithOptions(options, reason=""):
return
def endActivity(activity):
return
def nope():
return
def nap():
return
@contextmanager
def nope_scope(
options=0,
reason="Because Reasons"
):
yield
def napping_allowed():
return True