Anki/anki
Mike Blume dcf097b55f use futuristic division
Python used to use C-style division, where division of two ints was
truncated, and division involving a float resulted in a float.

This is confusing, because you often can't tell from looking at a
line of code in isolation what sort of division it's supposed to do.

With 'from __future__ import division' Python ensures that division is
always explicit.

// means (floored) integer division
/ means float division

regardless of argument types.

This should make the source a bit clearer now, as well as removing one
obstacle if Anki is ever ported to Python 3.
2013-05-05 11:09:16 -07:00
..
importing make sure we don't chomp embedded newlines when clearing comments (#722) 2013-04-11 14:33:30 +09:00
template handle nbsp in furigana (#327) 2013-04-11 14:45:53 +09:00
__init__.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
anki optimize imports 2012-12-22 09:17:10 +09:00
ankiweb.certs merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
cards.py optimize imports 2012-12-22 09:17:10 +09:00
collection.py strip tags before including on card (#505) 2013-01-31 14:07:17 +09:00
consts.py add upper bound to # of media files in single zip 2013-04-11 14:13:11 +09:00
db.py optimize imports 2012-12-22 09:17:10 +09:00
decks.py allow apostrophe in deck names (#623) 2013-02-01 23:21:53 +09:00
errors.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
exporting.py optimize imports 2012-12-22 09:17:10 +09:00
find.py failure to find a field should not break entire query 2013-04-22 22:13:29 +09:00
hooks.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
js.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
lang.py fix i18n when /usr/bin/locale exists 2012-12-21 18:47:51 +09:00
latex.py optimize imports 2012-12-22 09:17:10 +09:00
media.py Only the Mac file system stores file names NFD-normalized. So do that normalization only there when looking for files. 2013-04-11 17:37:06 +09:00
models.py make sure sort field updated when field deleted (#737) 2013-04-11 14:23:06 +09:00
notes.py don't save note if no changes made (#705) 2013-04-11 19:20:23 +09:00
sched.py use futuristic division 2013-05-05 11:09:16 -07:00
sound.py optimize imports 2012-12-22 09:17:10 +09:00
stats.py make sure y axis starts at 0 2013-05-04 15:45:57 +09:00
statsbg.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
stdmodels.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
storage.py optimize imports 2012-12-22 09:17:10 +09:00
sync.py fix some sync issues 2013-03-01 01:36:14 +09:00
tags.py merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
upgrade.py fix crash when ix_fields_factId was missing 2013-02-02 22:58:11 +09:00
utils.py use futuristic division 2013-05-05 11:09:16 -07:00