Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixmes about counters in citationTest #2

Open
codersquid opened this issue Feb 22, 2013 · 1 comment
Open

fixmes about counters in citationTest #2

codersquid opened this issue Feb 22, 2013 · 1 comment

Comments

@codersquid
Copy link
Member

Instead of the counter you could use zip. here's copy-paste from an ipython prompt for an example.

In [9]: for item in zip([1,2,3],['a','b','c']):
...: print item
...:
(1, 'a')
(2, 'b')
(3, 'c')

including this example since your test has a 3 item tuple but the tests/test.json has 4 elements.
In [10]: for item in zip([1,2,3],['a','b','c','d']):
print item
....:
(1, 'a')
(2, 'b')
(3, 'c')

btw, asked around and was told that you could use itertools.izip if you want an iterable instead of a list.

@codersquid
Copy link
Member Author

If you like, I'll fix this, but there are some other things that need fixing in Citation before I get to this, and I wanted to leave a helpful comment here while I get on to the other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant