On Apr 21, 7:04 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> Off the top of my head: copy C and use {} to demarcate blocks and ';' to
> end statements, so that '\n' is not needed and is just whitespace when
> present. So, repeatedly scan for the next one of '{};'.
try this:
from __future__ impo
On Apr 21, 4:01 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 21 Apr, 00:54, Dan Bishop <[EMAIL PROTECTED]> wrote:
>
>
>
> > We wouldn't even need that. Just a new source encoding. Then we
> > could write:
>
> > # -*- coding: end-block -*-
>
> [...]
>
> Someone at EuroPython 2007 did a lightnin
Terry Reedy <[EMAIL PROTECTED]> wrote:
> Off the top of my head: copy C and use {} to demarcate blocks and ';' to
> end statements, so that '\n' is not needed and is just whitespace when
> present. So, repeatedly scan for the next one of '{};'.
That would break if those characters appear in str
On 21 Apr, 00:54, Dan Bishop <[EMAIL PROTECTED]> wrote:
>
> We wouldn't even need that. Just a new source encoding. Then we
> could write:
>
> # -*- coding: end-block -*-
[...]
Someone at EuroPython 2007 did a lightning talk showing working code
which provided C-style block structuring using th
"Dan Bishop" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| We wouldn't even need that. Just a new source encoding. Then we
| could write:
|
| # -*- coding: end-block -*-
Ummm.. source encoding refers to how unicode chars/codepoints are
represented as bytes. This syntax is cop
"Matthew Woodcraft" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Terry Reedy <[EMAIL PROTECTED]> wrote:
|
| > But you do not really need a variant. Just define a preprocessor
| > function 'blockify' which converts code in an alternate syntax to
| > regular indented block syntax.
On Apr 20, 6:54 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Apr 20, 11:42 am, Matthew Woodcraft
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Christian Heimes <[EMAIL PROTECTED]> wrote:
>
> > >> I feel that including some optional means to block code would be a big
> > >> step in getting wider adoptio
On Apr 20, 11:42 am, Matthew Woodcraft
<[EMAIL PROTECTED]> wrote:
> Christian Heimes <[EMAIL PROTECTED]> wrote:
>
> >> I feel that including some optional means to block code would be a big
> >> step in getting wider adoption of the language in web development and
> >> in general. I do understand
On Apr 20, 12:34 pm, Eric Wertman <[EMAIL PROTECTED]> wrote:
> > Look into any of the dozen Python-based template engines that are
> > typically used for such tasks; they offer many more features than a
> > way to indent blocks.
>
> > George
>
> I definitely will.. could you throw out some examples
On 20 avr, 17:35, Eric Wertman <[EMAIL PROTECTED]> wrote:
> I was considering putting together a proposal for an alternate block
> syntax for python, and I figured I'd post it here and see what the
> general reactions are. I did some searching, and while I found a lot
> of tab vs space debates, I
On Apr 20, 1:29 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Sun, 20 Apr 2008 13:42:05 -0300, Matthew Woodcraft <[EMAIL PROTECTED]>
> escribió:
>
> > An alternative scheme for describing the block structure could be
> > useful in other cases, though. For example, if you wanted to suppor
Terry Reedy <[EMAIL PROTECTED]> wrote:
> But you do not really need a variant. Just define a preprocessor
> function 'blockify' which converts code in an alternate syntax to
> regular indented block syntax. Then
>
> exec(blockify(alt_code_string))
You can do it like that, but if it were to beco
En Sun, 20 Apr 2008 13:42:05 -0300, Matthew Woodcraft <[EMAIL PROTECTED]>
escribió:
> An alternative scheme for describing the block structure could be
> useful in other cases, though. For example, if you wanted to support
> putting snippets of Python in configuration files, or spreadsheet
> cell
"Matthew Woodcraft" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| There's no need to support the new scheme in .py files, so it seems to
| me that this doesn't have to be done in the core language. All that's
| needed is a variant of 'eval' which expects the alternate scheme, and
Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> By 'eval', I guess you mean 'exec' :)
Yes. Shows how often I use either.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 20, 5:42 pm, Matthew Woodcraft
<[EMAIL PROTECTED]> wrote:
> Christian Heimes <[EMAIL PROTECTED]> wrote:
>
> >> I feel that including some optional means to block code would be a big
> >> step in getting wider adoption of the language in web development and
> >> in general. I do understand
Christian Heimes <[EMAIL PROTECTED]> wrote:
>> I feel that including some optional means to block code would be a big
>> step in getting wider adoption of the language in web development and
>> in general. I do understand though, that the current strict indenting
>> is part of the core of the lan
> Look into any of the dozen Python-based template engines that are
> typically used for such tasks; they offer many more features than a
> way to indent blocks.
>
> George
I definitely will.. could you throw out some examples though?
Thanks!
Eric
--
http://mail.python.org/mailman/listinfo/pyth
On Apr 20, 11:35 am, Eric Wertman <[EMAIL PROTECTED]> wrote:
> I was considering putting together a proposal for an alternate block
> syntax for python, and I figured I'd post it here and see what the
> general reactions are. I did some searching, and while I found a lot
> of tab vs space debates
Eric Wertman schrieb:
> I was considering putting together a proposal for an alternate block
> syntax for python, and I figured I'd post it here and see what the
> general reactions are. I did some searching, and while I found a lot
> of tab vs space debates, I didn't see anything like what I'm th
20 matches
Mail list logo