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
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
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' )
>
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
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
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' )
>