Decorator Pattern with Iterator

2012-06-11 Thread Tom Harris
Greetings, I have a class that implements the iterator protocol, and tokenises a string into a series of tokens. As well as the token, it keeps track of some information such as line number, source file, etc. for tokens in Tokeniser(): do_stuff(token) What I want is to be able to wrap the

Decorator Pattern with Iterator

2012-06-11 Thread Oscar Benjamin
On 11 June 2012 08:51, Tom Harris celephi...@gmail.com wrote: Greetings, I have a class that implements the iterator protocol, and tokenises a string into a series of tokens. As well as the token, it keeps track of some information such as line number, source file, etc. for tokens in

Re: Decorator Pattern with Iterator

2012-06-11 Thread Ian Kelly
On Mon, Jun 11, 2012 at 1:51 AM, Tom Harris celephi...@gmail.com wrote: Greetings, I have a class that implements the iterator protocol, and tokenises a string into a series of tokens. As well as the token, it keeps track of some information such as line number, source file, etc. So each