Jan-02-2018, 03:24 PM
(Jan-02-2018, 02:55 PM)Windspar Wrote: I'm looking for another style with less typing.
This looks nicer. Just wondering if python has another way ?
test = (Test() .one() .two() .three())
I agree with buran about this type of code. I think a combination of good default values and maybe a "configuration" dict or namedtuple would be the better way to approach this. This weekend, I was playing around with implementing some of the mechanics of Arkham Horror (https://www.fantasyflightgames.com/en/pr...am-horror/) and was doing something very similar to read player/monster data from a JSON file and quickly instantiate objects.