Python not that wierd

Steve Lamb grey at despair.rpglink.com
Wed Aug 2 13:44:52 EDT 2000


On Wed, 2 Aug 2000 18:43:19 +0200, Alex Martelli <alex at magenta.com> wrote:
>Sorry, I don't understand.  match is optimized for the purpose of
>matching the whole-line, which seems to be exactly your purpose:

    Stubborness.  I think part of the process is "Well, might change
later"itos.  I just don't like the idea that the function/method call dictates
where the search is when there is regex options to do that.  Why create one
regex for one function only to change it later and then have to change the
function as well?  

>OK.  Although a long-time RPG'er myself (anybody remembers the Aleax
>monster in AD&D's monster-manual? no? oh well...), 

    Let me look it up when I get home. mine might have it.  Anyone remember
the Cthulu mythos in AD&D?  No?  How about D&D in a single, soft-bound, black
and while book <100 pages?  :)

>I've been out of touch with the genre for years, after all.  D1000 (three
>20-sided dice read each as a digit, of course, just an extension of D100) was

    Don't you mean 3 d10?  I wonder how you grok a 12, an 18 and a 6 into
something for 1000.  :)

>base hit-chance, so if you're 24% to hit why get only a 4% chance to impale
>when you can have a precise 4.8% by using a "1000-sided dice"...)

    Or one could round up to 5%, but heyyyyyy, let's not let simpler
mathematics than division ruin it for everyone.  :)

>guess those refinements didn't make it into the mainstream (although, if I
>were you, I'd pose the question on some general RPG discussion group;
>the 1000-sided die is such a natural that I'm surprised it's utterly
>unknown).

    To be honest, yours is the first mention of it I've run across, ever.

>Keep a reference to the class itself, rather than to its name, and your life
>is simpler:

    Ahhhhhh, good show there, Dangermouse!  So having classes st_dice, sw_dice
and wod_dice I could map those into a directory and then have:
dice = sets{"wod"}()

    Or am I off on that?  BTW, that is most likely wrong, I've not done a
directory yet in Python so the syntax isn't in my brain.

>Yep, it's fun, innit?  The pervasive use of dictionaries ('hashes' to
>Perlists:-), so you can generally supply your own dictionary in lieu
>of vars(), or use vars() as a dictionary, etc, etc, is also lots of fun.
>Each class-instance has its dict, so has the class as a whole, ...

    Slight tangent, I'm surprised that more people don't handle arrays like
PHP does.  An array in PHP is just a hash that happens to have numerical keys
in order.  :)

>Well, there ARE cases where you want to roll and sum two different
>kind of dice, surely.  Even in bad old D&D first edition, in certain cases
>you had D8+D4, for example...

    For those I'd issue two rolls.  The server allows comments to be used.  So
something like this would work:

co: Here's Blorg snafu roll (d8+d4)
d8
d4

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list