- Implement escaping by the backslash character
- advantages: elegant and predictable
- disadvantages: even more backwards incompatible than the current patch
- Make another list for the
__init__
method with prefixes disallowed for inline comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pip install testunicodepackagedependant | |
Downloading/unpacking testunicodepackagedependant | |
Downloading testunicodepackagedependant-1.0.tar.gz | |
Storing download in cache at /Users/ambv/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftestunicodepackagedependant%2Ftestunicodepackagedependant-1.0.tar.gz | |
Running setup.py (path:/private/tmp/testestest/build/testunicodepackagedependant/setup.py) egg_info for package testunicodepackagedependant | |
Downloading/unpacking testunicodepackage==1.0 (from testunicodepackagedependant) | |
Downloading testunicodepackage-1.0.tar.gz | |
Cleaning up... | |
Exception: |
I hereby claim:
- I am ambv on github.
- I am ambv (https://keybase.io/ambv) on keybase.
- I have a public key whose fingerprint is E3FF 2839 C048 B25C 084D EBE9 B269 95E3 1025 0568
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Repacks entries in a ZIP file so that they become correctly zipimportable \ | |
in Python 3.5. See https://bugs.python.org/issue25710 for details. | |
""" | |
import argparse | |
from pathlib import Path | |
import importlib._bootstrap_external | |
import sys |
OlderNewer