Having:
>>> import requests >>> s = requests.Session()
We cannot currently reliably do:
from decimal import Decimal | |
from functools import singledispatch | |
# | |
# @singledispatch has to be moved inside __init__ to | |
# make registration work per instance. | |
# | |
class State: | |
def __init__(self): |
#!/usr/bin/env python | |
""" | |
enable_offline.py - symlink files in your PIP_DOWNLOAD_CACHE so that | |
``pip install --find-links`` picks them up. | |
Inspired by http://tartley.com/?p=1423 | |
Usage | |
----- |
Specifying choices for form fields and models currently does not do much justice to the DRY philosophy Django is famous for. Everybody seems to either have their own way of working around it or live with the suboptimal tuple-based pairs. This Django enhancement proposal presents a comprehensive solution based on an existing
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" A response to http://terse-words.blogspot.com/2011/11/mapreduce-in-python.html """ | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import unicode_literals |
import os | |
import re | |
import stat | |
import sys | |
if sys.version_info < (3, 1): | |
sys.stderr.write("Python 3.1+ required. Sorry.") | |
sys.exit(0) | |
READ_WRITE = re.compile(b"svn\+ssh://pythondev@svn\.python\.org") |