Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added example file and extended example in readme
- Loading branch information
Liam Curry
committed
Apr 18, 2013
1 parent
771703b
commit 12e296a
Showing
3 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# FixApply | ||
apply(hello, args, kwargs) | ||
|
||
# FixBasestring | ||
basestring | ||
|
||
# FixBuffer | ||
buffer('hello', 1, 3) | ||
|
||
# FixCallable | ||
callable('hello') | ||
|
||
# FixDict | ||
d.keys() | ||
d.iteritems() | ||
d.viewvalues() | ||
|
||
# FixExcept | ||
try: | ||
import asdf | ||
except E, T: | ||
pass | ||
|
||
# FixExec | ||
exec code in ns1, ns2 | ||
|
||
# FixExecfile | ||
execfile('test.py') | ||
|
||
# FixFilter | ||
filter(lambda x: x, [1, 2, 3]) | ||
|
||
# FixFuncattrs | ||
def test(): | ||
pass | ||
test.func_name | ||
test.func_closure | ||
test.func_dict | ||
|
||
# FixFuture | ||
from __future__ import absolute_import | ||
|
||
# FixHasKey | ||
d.has_key('foobar') | ||
|
||
# FixImport | ||
from py3kwarn import tests | ||
|
||
# FixImports | ||
import StringIO | ||
import cStringIO | ||
import cPickle | ||
import __builtin__ | ||
|
||
# FixInput | ||
input('FixInput') | ||
|
||
# FixIntern | ||
intern(s) | ||
|
||
# FixIsinstance | ||
isinstance(x, (int, long)) | ||
isinstance(x, (int, int)) | ||
|
||
# FixItertoolsImports | ||
from itertools import imap | ||
from itertools import ifilter | ||
from itertools import izip | ||
from itertools import ifilterfalse | ||
|
||
# FixUnicode | ||
u'Hello World' | ||
|
||
# FixLong | ||
long | ||
|
||
# More... |
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