Sponsored by pythonbytes.fm/datadog
__pypackages__directory and prefer importing packages installed in this location over user or global site-packages. This will avoid the steps to create, activate or deactivate “virtual environments”. Python will use the
__pypackages__from the base directory of the script when present.
pipthat automatically recognizes a
__pypackages__directory and prefers importing packages installed in this location over user or global site-packages. If you are familiar with node,
__pypackages__works similarly to
__pypackages__path will automatically be searched first for packages. And instead of running
piplocand it will install/uninstall from
def build_asset(env: webassets.Environment, files: List[str], filters: str, output: str): bundle = webassets.Bundle( *files, filters=filters, output=output, env=env ) bundle.build(force=True)
@mock.patch('work.os') def test_using_decorator(self, mocked_os): work_on() mocked_os.getcwd.assert_called_once()
def test_using_context_manager(self): with mock.patch('work.os') as mocked_os: work_on() mocked_os.getcwd.assert_called_once()
From the list from Ant, my votes.
Q: What's the second movie about a database engineer called? A: The SQL.
!false It's funny 'cause it's true.
A programmer's spouse tells them, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen." The programmer comes home with 12 loaves of bread.