Re: I'd like to use "semantic indentation"

2017-09-30 Thread Paul Rubin
Chris Angelico writes: > USA: > Alabama: > Abbeville > Addison > ... > and then, as Paul suggested, write a simple parser to read it. That looks like YAML, which there's already a library for. I'm not crazy about it but it might be an ok choice for this. -- https://m

Re: I'd like to use "semantic indentation"

2017-09-30 Thread bartc
On 30/09/2017 19:12, Stefan Ram wrote: I would like to write source code similar to: country( 'USA' ) state( 'Alabama' ) town( 'Abbeville' ) town( 'Addison' ) state( 'Arizona' ) town( 'Apache Junction' ) town( 'Avondale ) town( 'Benson' ) using "semantic ind

Re: I'd like to use "semantic indentation"

2017-09-30 Thread Chris Angelico
On Sun, Oct 1, 2017 at 5:12 AM, Stefan Ram wrote: > I would like to write source code similar to: > > country( 'USA' ) > state( 'Alabama' ) > town( 'Abbeville' ) > town( 'Addison' ) > state( 'Arizona' ) > town( 'Apache Junction' ) > town( 'Avondale ) > town( 'Benson' ) >

Re: I'd like to use "semantic indentation"

2017-09-30 Thread Paul Rubin
r...@zedat.fu-berlin.de (Stefan Ram) writes: > I would like to write source code similar to: > country( 'USA' ) > state( 'Alabama' ) Aside from the workaround that I mentioned, this looks more like data than code. Maybe you really want to create a nested structure (dictionaries, JSON, XML or

Re: I'd like to use "semantic indentation"

2017-09-30 Thread Paul Rubin
r...@zedat.fu-berlin.de (Stefan Ram) writes: > I would like to write source code similar to: > country( 'USA' ) > state( 'Alabama' ) ... > It seems I can't do this with Python. Is there any workaround? _= country( 'USA' ) _= state( 'Alabama' ) _= town( 'Abbeville' ) _= town

Re: I'd like to use "semantic indentation"

2017-09-30 Thread Joonas Liik
On 30 September 2017 at 21:12, Stefan Ram wrote: > I would like to write source code similar to: > > country( 'USA' ) > state( 'Alabama' ) > town( 'Abbeville' ) > town( 'Addison' ) > state( 'Arizona' ) > town( 'Apache Junction' ) > town( 'Avondale ) > town( 'Benson' ) >