Pythonic way to sum n-th list element?

Steve Holden sholden at holdenweb.com
Mon Apr 28 14:03:58 CEST 2003


"Alex Martelli" <aleax at aleax.it> wrote in message
news:3japa.44301$LB6.997057 at news1.tin.it...

[why Tim and Guido are dead good ...]

> To be properly thankful that we're not using an Alex-designed
> language, we might want to look at a simple example from the
> domain-specific language BBL (Bridge-Bidding Language) which I
> designed and implemented in the '80s [well before I met Python --
> but I was quite familiar with Icon, REXX and other highly
> readable very-high-level languages, so that's no excuse;-)].
>
> Here's the BBL expression to determine whether the current hand
> is suitable for a weak-notrump opener...:
>
> & (                      # conditions for a weak-notrump opener
>     s ( 1 g 4  3  3  3   # shape 4333 (any), or...
>         2 g 4  4  3  2   #       4432 (any), or...
>         3   3- 3- 3- 5   #       5332 w 5 clubs, or...
>         4   3- 3- 5  3-  #       5332 w 5 diamonds;
>       )
>     < ( 11                    # moreover, a 12-14 range for
>         \+ SHDC c( 4 3 2 1 0) # normal Milton-Work point-count
>         15
>       )
>   )
>
> There -- aren't you glad I don't do language design any more?-)
>

On this evidence it's arguable that you never did! This language was
*designed*?

but-anyway-let's-all-be-grateful-for-python-ly y'rs  - steve
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list