Python descriptor protocol (for more or less structured data)

2013-07-30 Thread CWr
Hi together, Some years ago I started a small WSGI project at my university. Since then the project was grown up every year. Some classes have more than 600 lines of code with (incl. boiler-plates mostly in descriptors/properties). Many of these properties are similar or have depencies among t

Re: Python descriptor protocol (for more or less structured data)

2013-07-31 Thread CWr
Peter, thanks for your response. Sure, you are right when you say that's easier to use standard attribute assigning via __init__. But my intention was: - reducing the complexiticity of __init__ - avoiding boiler-plates (mostly property descriptors inside of the main class) - creating instances (f

string processing - some problems whenever I have to parse a more complex string

2014-10-21 Thread CWr
Hello together, currently I have to parse a string in an atomic way. Normally - in this case too - I have a counter variable to keep the current position inside the string. So far, I think this is the most flexible solution to do some lookaround's inside the string if necessary. Subroutines wi