Re: code indentation
- From: "Diez B. Roggisch" <deets@xxxxxxxxxxxxx>
- Date: Fri, 27 Jul 2007 00:33:55 +0200
vedrandekovic@xxxxxxxxxxxxxx schrieb:
On 26 srp, 13:43, Steve Holden <st...@xxxxxxxxxxxxx> wrote:Thorsten Kampe wrote:* (Wed, 25 Jul 2007 11:22:03 -0700)We should be making allowances for this particular poster on account ofOn 25 srp, 17:31, Wildemar Wildenburger <wilde...@xxxxxxxxxxxx> wrote:You already got serious help even though you haven't realised thatvedrandeko...@xxxxxxxxxxxxxx wrote:On this group I ask for serious help and now we talk aboutWhats stupid about this? It's sane advice.And while we're on the topic of communication: The original posterAnd if you can help me than please help me , but if you can't then
would do well to learn that increasing the number of consecutive
punctuation marks (!!!, ???) is a sure way to turn away many people
who would otherwise be helpful. Sentences need at most one '!' or '?',
adding more does not improve the chances of being taken seriously.
please don't leave me some stupid messages
Which looks more serious to you:
this:
I can't do it!!!! Can you PLEASE help me????!!!?!
or this:
I don't know the answer. Can you please help me?
Even if it makes no difference to you, to many people it does. So Ben is
right: People *will* take your posts more seriously if you restrict your
use of punctuation (if only because its easier to read).
Don't feel offended, nobody was trying to put you down.
communication. Then I you don't know how to help me then please DON'T
SAY ANYTHING
yet.
relative youth: I hadn't realised earlier, but we are dealing with a
fourteen-year-old. Since fourteen-year-olds already know everything we
should be honored we are being asked for help at all ;-)
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------
Hi again,
Just one more question, can I maybe do this indentation with string
e.g
here is my failed example of try with string:
kl="n=90;if n==90:print'kajmakimar'"
for line in kl.split(";"):
li=[]
m=li.append(line)
if line.endswith(':'):
m.append("\n\t\t\t\t\t\t\t\t")
print m
.....so maybe if you can help me with this?
This won't work. It's impossible to know how deep to indent without any begin/end-tokens. Consider this simple example:
if foo:
print "foo"
if bar:
print "bar"
is equal to
'if foo:;print"foo";if bar:;print "bar"'
But that could as well be
if foo:
print "foo"
if bar:
print "bar"
So - you need some block delimiters.
And as it has been said to you a bazzillion times: stop doing what you're doing. Use python. As it is. Your limited understandig of parsing and language design makes your task beyond your capabilites. For now. And the forseeable future...
diez
.
- References:
- code indentation
- From: ...:::JA:::...
- Re: code indentation
- From: Gabriel Genellina
- Re: code indentation
- From: vedrandekovic
- Re: code indentation
- From: Steve Holden
- Re: code indentation
- From: Ben Finney
- Re: code indentation
- From: vedrandekovic
- Re: code indentation
- From: Wildemar Wildenburger
- Re: code indentation
- From: vedrandekovic
- Re: code indentation
- From: Thorsten Kampe
- Re: code indentation
- From: Steve Holden
- Re: code indentation
- From: vedrandekovic
- code indentation
- Prev by Date: Re: is_iterable function.
- Next by Date: Learning Jython?
- Previous by thread: Re: code indentation
- Next by thread: Re: code indentation
- Index(es):
Relevant Pages
|
Loading