Re: [Tutor] how to only loop over first 'x' items of a list; writing a Twitter bot with tweepy

2013-11-25 Thread Alan Gauld
On 25/11/13 18:18, Jared Nielsen wrote: Hi all, Noob. For a beginner project I'm hacking together a Twitter bot with tweepy. I've got one more or less functional, but I'm running into a problem when making a list of followers by calling the Twitter api. I'm getting a 'Rate limit exceeded' error,

Re: [Tutor] how to only loop over first 'x' items of a list; writing a Twitter bot with tweepy

2013-11-25 Thread Mark Lawrence
On 25/11/2013 18:18, Jared Nielsen wrote: Hi all, Noob. For a beginner project I'm hacking together a Twitter bot with tweepy. I've got one more or less functional, but I'm running into a problem when making a list of followers by calling the Twitter api. I'm getting a 'Rate limit exceeded' erro

[Tutor] how to only loop over first 'x' items of a list; writing a Twitter bot with tweepy

2013-11-25 Thread Jared Nielsen
Hi all, Noob. For a beginner project I'm hacking together a Twitter bot with tweepy. I've got one more or less functional, but I'm running into a problem when making a list of followers by calling the Twitter api. I'm getting a 'Rate limit exceeded' error, which, evidently is due to changes in the

Re: [Tutor] Patchwork Help

2013-11-25 Thread Alan Gauld
On 25/11/13 15:54, Callum Wilson wrote: Hi, I am a relatively beginner to python. I am currently studying Digital Forensics at University I have no idea what Digital Forensics might be but I assume that part is not pertinent to the actual question below so I'll ignore it for now! :-) I have

Re: [Tutor] Patchwork Help

2013-11-25 Thread Don Jennings
On Nov 25, 2013, at 10:54 AM, Callum Wilson wrote: > Hi, > > I am a relatively beginner to python. I am currently studying Digital > Forensics at University and programming using Python is currently a unit i am > studying. > > I have to complete a worksheet for Friday 29th, but i am having

[Tutor] Patchwork Help

2013-11-25 Thread Callum Wilson
Hi, I am a relatively beginner to python. I am currently studying Digital Forensics at University and programming using Python is currently a unit i am studying. I have to complete a worksheet for Friday 29th, but i am having trouble in doing this and wanted to seek external help. I have to create

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Steven D'Aprano
On Mon, Nov 25, 2013 at 12:07:47PM +0530, Reuben wrote: > Hi, > > > Question no 1: > -- > I would like to know why do we actually inherit classes? What would be the > benefit of inheriting? > > If possible, a practical example would be of great help Fundamentally, inheritenc

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Reuben
Thanks to Alan and Dominik for their explanation and valuable time to provide their inputs. On Mon, Nov 25, 2013 at 4:41 PM, Alan Gauld wrote: > On 25/11/13 06:37, Reuben wrote: > > Question no 1: >> -- >> I would like to know why do we actually inherit classes? What would

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Alan Gauld
On 25/11/13 13:29, Albert-Jan Roskam wrote: > ===> interesting. Is this (a) the same as or (b) > similar to Abstract Base Classes (ABC) in Python? MIB...is usually defined in terms of Managed Objects(MO). There is a standard protocol (a set of methods or API) that all MOs must adhere

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Albert-Jan Roskam
Another case in in Network management. Network management systems use what is called a MIB. A Management Information Base. The MIB is usually defined in terms of Managed Objects(MO). There is a standard protocol (a set of methods or API) that all MOs must adhere to. Specific types of ne

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Dominik George
Hi Reuben, > Question no 1: > -- > I would like to know why do we actually inherit classes? What would be the > benefit of inheriting? I think this is not the classical explanation of this, but when teaching programming to my students, I make a very great deal of the following

Re: [Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Alan Gauld
On 25/11/13 06:37, Reuben wrote: Question no 1: -- I would like to know why do we actually inherit classes? What would be the benefit of inheriting? Inheritance is the key to providing polymorphism. It also saves a lot of duplication in that a new class only has to impleme

Re: [Tutor] Date time

2013-11-25 Thread Sunil Tech
Thank you Danny On Mon, Nov 25, 2013 at 2:36 PM, Danny Yoo wrote: > On Mon, Nov 25, 2013 at 12:31 AM, Sunil Tech > wrote: > > I want to know, what difference is in between *mxDateTime & datetime of >> python?* >> looking for your comments... >> > > > According to the mxDateTime web site, it p

[Tutor] Usefulness of classes and necessity of inheriting classes

2013-11-25 Thread Reuben
Hi, Question no 1: -- I would like to know why do we actually inherit classes? What would be the benefit of inheriting? If possible, a practical example would be of great help Question no 2: -- Why would I ever use a class? I understand this is strange

Re: [Tutor] Depth First Search Listing all possible combinations

2013-11-25 Thread Randolph Scott-McLaughlin II
I solved the question thanks to Alan's suggestions. Attached is the .py file I ran to solve my question. Thanks guys. On Sat, Nov 23, 2013 at 8:41 PM, Randolph Scott-McLaughlin II < randolph.michael...@gmail.com> wrote: > So I cleaned up the code to make it readable. I'm not getting an error >

Re: [Tutor] Date time

2013-11-25 Thread Danny Yoo
On Mon, Nov 25, 2013 at 12:31 AM, Sunil Tech wrote: > I want to know, what difference is in between *mxDateTime & datetime of > python?* > looking for your comments... > According to the mxDateTime web site, it provides a compatible interface to the standard library's version. http://www.

Re: [Tutor] Date time

2013-11-25 Thread Mark Lawrence
On 25/11/2013 08:31, Sunil Tech wrote: I want to know, what difference is in between*mxDateTime & datetime of python?* looking for your comments... Thank you in advance. What do you need to know that the documentation doesn't tell you? While you're rereading the docs you might also like to

[Tutor] Date time

2013-11-25 Thread Sunil Tech
I want to know, what difference is in between *mxDateTime & datetime of python?* looking for your comments... Thank you in advance. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/lis

Re: [Tutor] Fibonacci Series

2013-11-25 Thread Rafael Knuth
@Alan @Dave @Dominik thank you all so much for the elaborate explanations! It's really simple and crystal clear now, the most difficult part was actually to detect and overcome my own misconceptions. Once I did that, the rest was really easy. Kind of a valuable learning for the future ;-) Instead