¡@

Home 

python Programming Glossary: machin

Python class to merge sorted files, how can this be improved?

http://stackoverflow.com/questions/1001569/python-class-to-merge-sorted-files-how-can-this-be-improved

following solution Second Edit Updated the code per John Machin 's suggestion def decorated_file f key Yields an easily sortable.. solution took 40 minutes 2408.5 seconds After adding John Machin 's suggestions the solution code took 36 minutes 2214.0 seconds..

Iterating through a range of dates in Python

http://stackoverflow.com/questions/1060279/iterating-through-a-range-of-dates-in-python

one iterator not two. Update after discussion with John Machin Maybe the most elegant solution is using a generator function..

SQLite, python, unicode, and non-utf data

http://stackoverflow.com/questions/2392732/sqlite-python-unicode-and-non-utf-data

note My console was set to display in 'latin_1' as @John Machin pointed out. What gives After reading this describing exactly.. Much thanks for the answers below and especially to @John Machin for answering so thoroughly. python sqlite unicode utf 8 ..

Counting collisions in a Python dictionary

http://stackoverflow.com/questions/4865325/counting-collisions-in-a-python-dictionary

id self id other def __hash__ self #return id self # @John Machin yes I know return 1 objects Foo for i in xrange n d for o in.. objects are the same not their crunched version as @John Machin put it python optimization dictionary share improve this..

Why is ElementTree raising a ParseError?

http://stackoverflow.com/questions/7693515/why-is-elementtree-raising-a-parseerror

xml parsing share improve this question As @John Machin suggested the files in question do have dubious numeric entities..

Python UTF-16 CSV reader

http://stackoverflow.com/questions/9177820/python-utf-16-csv-reader

size running into several GBs of data. Answers for John Machin questions below print repr open 'test.csv' 'rb' .read 100 Output..