[Python-Dev] pipe syntax for sequential data (original) (raw)
" Maxim Krikun " tws5 at mail.ru
Tue Apr 13 10:06:39 EDT 2004
- Previous message: [Python-Dev] Re: Candidate Function Decorator
- Next message: [Python-Dev] pipe syntax for sequential data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Helo python-dev.
Please take a look at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/276960
This recipe proposes an alternative syntax for sequential data processing functions, that reflects unix shell pipe syntax. Here is an example:
bash_users = ( file('/etc/passwd') | grep('/bin/bash') | aslist )
I don't know if this idea was already explored before; hope this can be useful. For details and sample code please see link above.
regards,
Maxim
- Previous message: [Python-Dev] Re: Candidate Function Decorator
- Next message: [Python-Dev] pipe syntax for sequential data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]