Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-19 Thread Scurvy Scott
[SNIP] Thank you guys so much, sorry for the delayed response. It's awesome being able to learn a thing or two from people who know so much about their craft. I've got the code working the way I envisioned it now and probably couldn't without y'alls help. I'm so glad this mailing list exists,

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-16 Thread Steven D'Aprano
On 16/01/13 11:23, Scurvy Scott wrote: After playing with your example I keep being told that list has no attribute int_to_note. I know what the problem is, I just don't know how to fix it. Oops, sorry about that, that is my fault. I did warn that my code was untested! If you know what the

[Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Scurvy Scott
Hello guys, I'm using Ubuntu 12.10 and Python 2.7 right now. I'm working on code using the Mingus module but this question isn't specific to this module, per se. What I'm trying to do is to generate the fibonacci numbers up to a given N and then do modulo 12 on each number in order to create a

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Oscar Benjamin
On 15 January 2013 23:40, Scurvy Scott etanes...@gmail.com wrote: [SNIP] Anyways, the problem I'm having is I'm not really sure how to search a list for multiple elements and remove just those elements. Below is my code so far, and information y'all could provide would be appreciated. Thanks.

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Steven D'Aprano
On 16/01/13 10:40, Scurvy Scott wrote: [...] Anyways, the problem I'm having is I'm not really sure how to search a list for multiple elements and remove just those elements. Below is my code so far, and information y'all could provide would be appreciated. Thanks. Actually, your problem so

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Oscar Benjamin
On 15 January 2013 23:53, Scurvy Scott etanes...@gmail.com wrote: Anyways, the problem I'm having is I'm not really sure how to search a list for multiple elements and remove just those elements. Below is my code so far, and information y'all could provide would be appreciated. Thanks.

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Scurvy Scott
On Tue, Jan 15, 2013 at 4:01 PM, Steven D'Aprano st...@pearwood.info wrote: On 16/01/13 10:40, Scurvy Scott wrote: [...] Anyways, the problem I'm having is I'm not really sure how to search a list for multiple elements and remove just those elements. Below is my code so far, and information

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Scurvy Scott
SNIP So here I extract out of your code (untested!) a generator which produces an infinite series of Fibonacci numbers, one at a time: def fib(): a, b = 0, 1 while True: yield b a, b = b, a+b This is untested, I may have got it wrong. Next, a function to

Re: [Tutor] Question regarding lists and manipulating items in lists.

2013-01-15 Thread Andreas Perstinger
On 16.01.2013 01:23, Scurvy Scott wrote: After playing with your example I keep being told that list has no attribute int_to_note. I know what the problem is, I just don't know how to fix it. [SNIP] So right now my code is: import mingus.core.notes as notes