473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

python code with indention

is it possible to write python code without any indentation?

Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #1
32 2241
Xah Lee wrote:
is it possible to write python code without any indentation?


Yes.

Reinhold
Jul 18 '05 #2
Xah Lee said unto the world upon 2005-02-07 14:39:
is it possible to write python code without any indentation?

Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


print "It would seem it is indeed possible."
print
print "Note: although I know this, I don't consider myself an "
print "accomplished Pythoner."
print
print "In the face of that, "
print "I know enough not to post Python 'tutorials'."

Best,

Brian vdB

Jul 18 '05 #3

"Xah Lee" <xa*@xahlee.org> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
is it possible to write python code without any indentation?


I read just today in a tutorial that "Python on the other hand, does not
even allow changes in code's indentation". Maybe the author of that
tutorial can help?
Jul 18 '05 #4
On Mon, Feb 07, 2005 at 03:43:15PM -0500, Dan Perl wrote:

"Xah Lee" <xa*@xahlee.org> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
is it possible to write python code without any indentation?


I read just today in a tutorial that "Python on the other hand, does not
even allow changes in code's indentation". Maybe the author of that
tutorial can help?


And to think he posted both on the same day. It'd be funny if it weren't so
sad... actually it's just funny.

Anyway, in response to the question see
http://docs.python.org/ref/indentation.html#l2h-9

A sequence of statements without any looping or function or class definitions
can probably be done without any indenting.

Chris
Jul 18 '05 #5
"Xah Lee" <xa*@xahlee.org> writes:
is it possible to write python code without any indentation?


Not if Turing-completeness is something you desire.

Nick

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #6

"Xah Lee" <xa*@xahlee.org> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
is it possible to write python code without any indentation?

Xah
Depends on what you mean by "python code."
If you mean using the full facilities of the language,
then the answer is clearly no - indentation is not
optional.

You can, of course, write a silly little inline script without
any control structures that will all line up at the left
margain. So what?

John Roth
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Jul 18 '05 #7
Nick Vargish <na*******@bandersnatch.org> writes:
"Xah Lee" <xa*@xahlee.org> writes:
is it possible to write python code without any indentation?


Not if Turing-completeness is something you desire.


It's possible to implement a turing machine with a single list
comprehension. No indentation needed.

Bernhard

--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
Jul 18 '05 #8
On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote:
Nick Vargish <na*******@bandersnatch.org> writes:
"Xah Lee" <xa*@xahlee.org> writes:
is it possible to write python code without any indentation?


Not if Turing-completeness is something you desire.


It's possible to implement a turing machine with a single list
comprehension. No indentation needed.


I had to think about it, it's an interesting, and I'm going to tentatively
disagree, because of the statement/expression dichotomy. "Tentatively"
because if somebody can answer these objections than I will happily change
my mind :-)

I can't figure out how to write a TM in a Python List Comprehension
without one of either "variable binding" (so we can store the last symbol
list and manipulate it in the next iteration) or "recursive function" (to
express the whole tape as a recursive function), both of which require
statements. I can figure out how to write a single state transition, but
in a single LC I can't figure out how to feed the new state into the next
iteration; the previous values generated in the LC are, to my knowledge,
not accessible to the LC as it is running. (If they are, I *think* that
would indeed be enough.)

I'm sure Haskell could do both, being a functional language, and I am
satisfied that it is probably possible in that language, as long as you
are resigned to creating a wasted list (which may not even matter in
Haskell). But I think you're screwed in Python with an LC.

However, hack hack hack, I think you could do this in Python 2.4 with a
*generator* comprehension and a couple of supporting lines of non-indented
code:

Python 2.4 (#1, Jan 2 2005, 22:17:50)
[GCC 3.4.3 (Gentoo Linux 3.4.3, ssp-3.4.3-0, pie-8.7.6.6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import sys
this = sys.modules[__name__]
magicGenerator = (getattr(this, "results")[-1] + 1 for x in range(5))
results = [0] # you have to prime the state here
results.extend(magicGenerator)
results [0, 1, 2, 3, 4, 5]


Now you *can* get at the previous state and write a state-transition
expression in perfectly legal Python.

What do you know, generator comprehensions are Turing Complete and list
comprehensions aren't. I wouldn't have expected that.

People caught using this technique in real code will be caught and forced
to code in Intercal for the rest of their lives.
Jul 18 '05 #9
Jeremy Bowers wrote:


I can't figure out how to write a TM in a Python List Comprehension
without one of either "variable binding" (so we can store the last symbol
list and manipulate it in the next iteration) or "recursive function" (to
express the whole tape as a recursive function), both of which require
statements. I can figure out how to write a single state transition, but
in a single LC I can't figure out how to feed the new state into the next
iteration; the previous values generated in the LC are, to my knowledge,
not accessible to the LC as it is running. (If they are, I *think* that
would indeed be enough.)

How about:
def fact_ge(n): .... f = [1]
.... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f))
.... return f
.... fact_ge(10) [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]


as a "stateful" genexp?
Michael
Jul 18 '05 #10
On Tue, 08 Feb 2005 10:24:28 -0800, Michael Spencer wrote:
How about:
>>> def fact_ge(n): ... f = [1]
... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f))
... return f
... >>> fact_ge(10) [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800] >>>


as a "stateful" genexp?


That's not a generator expression, that's a generator function. Nobody
contests they can reference earlier states, that's most of their point :-)

For context, we're trying to build Turing Completeness into Python without
indentation. I bailed out of a Xah Lee thread because people have
probably killed it :-) and this is entirely unrelated by now, except in
the vague sense he started with an (I'm sure entirely accidentally)
thought-provoking question.
Jul 18 '05 #11
Jeremy Bowers wrote:
On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote:
Now you *can* get at the previous state and write a state-transition
expression in perfectly legal Python.

What do you know, generator comprehensions are Turing Complete and list
comprehensions aren't. I wouldn't have expected that.

I see no difference between LCs and GEs in this respect:
import itertools as it

def fact_ge(n): ... f = [1]
... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f))
... return f
... def fact_lc(n): ... f = [1]
... [f.append(i*j) for i,j in it.izip(xrange(1,1+n), f)]
... return f
...
... fact_ge(10) [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800] fact_lc(10)

[1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]

Michael

Jul 18 '05 #12
On Tue, 08 Feb 2005 10:50:24 -0800, Michael Spencer wrote:
I see no difference between LCs and GEs in this respect:
>>> import itertools as it
>>>
>>> def fact_ge(n): ... f = [1]
... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f))
... return f
... >>> def fact_lc(n):

... f = [1]
... [f.append(i*j) for i,j in it.izip(xrange(1,1+n), f)]
... return f


The comments in my other post still hold true w.r.t. these not being just
LCs or genexps, but you have a point here. Allowing an external list will
give you the storage you need even for a LC.

OK then, I still don't quite see how you can build a Turing Machine in one
LC, but an LC and one preceding list assignment should be possible,
although the resulting list from the LC is garbage; the preceding list
will have the actual state data.

Jul 18 '05 #13
Jeremy Bowers wrote:

That's not a generator expression, that's a generator function. Nobody
contests they can reference earlier states, that's most of their point :-)
Are you sure?

I just wrote my examples in functions to label them

Here's your example with this method:
import itertools as it
results = [0]
magicGenerator = (i+1 for i,lastresult in it.izip(xrange(5),results))
results.extend(magicGenerator)
results [0, 1, 2, 3, 4, 5]

For context, we're trying to build Turing Completeness into Python without
indentation. I bailed out of a Xah Lee thread because people have
probably killed it :-) Didn't see it, but this looked interesting - presumably your point
and this is entirely unrelated by now, except in the vague sense he started with an (I'm sure entirely accidentally)
thought-provoking question.


Michael

Jul 18 '05 #14
Jeremy Bowers wrote:

OK then, I still don't quite see how you can build a Turing Machine in one
LC, but an LC and one preceding list assignment should be possible,
although the resulting list from the LC is garbage;
Not necessarily garbage - could be anything, say a copy of the results:
results = [0]
[(results.append(lastresult+1) or lastresult) for i, lastresult in it.izip(xrange(5),results)]
[0, 1, 2, 3, 4] # ok, missing the 5, but close!


I don't think the assignment is avoidable though.

I should clarify a point I made earlier
I see no difference between LCs and GEs in this respect:


What I meant was that both LCs and GEs can reference their prior state in the
same way. Of course, there is an important difference in that the LC returns
its list as soon as it is executed whereas the executing the genexp returns an
iterator that can delay the evaluation of all but the outer loop until its
next() is called. This makes a genexp equivalent to (at least some) functions,
and perhaps that was part of your point that I missed.

Michael

Jul 18 '05 #15
Jeremy Bowers <je**@jerf.org> writes:
On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote:
Nick Vargish <na*******@bandersnatch.org> writes:
"Xah Lee" <xa*@xahlee.org> writes:
is it possible to write python code without any indentation?
Not if Turing-completeness is something you desire.


It's possible to implement a turing machine with a single list
comprehension. No indentation needed.


I had to think about it, it's an interesting, and I'm going to tentatively
disagree, because of the statement/expression dichotomy. "Tentatively"
because if somebody can answer these objections than I will happily change
my mind :-)

Here's an implementation of a turing machine simulator I hacked up a
while ago. For readability's sake, it's a function definition with a
doc-string, but the heart of it is a single list comprehension which
could be written without indentation:
def listcomp_turing(M, T, initial_state = 0):
"""Run the turing machine M on the tape T.

The tape T should be a dictionary mapping head positions to the
value on the tape at that position. Valid values on the tape are 0
and 1. Empty positions have the value 0. The initial head position
is 0.

The turing machine M should be a sequence of state pairs. The state
of the machine is used as an index into that sequence and thus
should be in range(len(M)). Each state pair is a pair of
(write_symbol, head_direction, next_state) triples, one for each of
the possible values on the tape at the current head position. The
initial state is given by the optional parameter initial_state. If
the next state is None, the machine stops. The direction may be
either -1 or 1 meaning left and right respectively. The function
does not enforce this limitation but with other values the machine
is not a turing machine anymore.

The return value is T.
"""
[x for L in [[[initial_state, 0]]]
for state, pos in L
if state is not None
and (L.append([M[state][T.get(pos, 0)][2],
pos + M[state][T.get(pos, 0)][1]])
or T.__setitem__(pos, M[state][T.get(pos, 0)][0]))]
return T

For an example, lets take the one from wikipedia's article on turing
machines:
The following Turing machine has an alphabet {'0', '1'}, with 0
being the blank symbol. It expects a series of 1's on the tape, with
the head initially on the leftmost 1, and doubles the 1's with a 0
in between, i.e., "111" becomes "1110111". The set of states is {s1,
s2, s3, s4, s5} and the start state is s1. The action table is as
follows.

Old Read Wr. New Old Read Wr. New
St. Sym. Sym. Mv. St. St. Sym. Sym. Mv. St.
- - - - - - - - - - - - - - - - - - - - - - - -
s1 1 -> 0 R s2 s4 1 -> 1 L s4
s2 1 -> 1 R s2 s4 0 -> 0 L s5
s2 0 -> 0 R s3 s5 1 -> 1 L s5
s3 0 -> 1 L s4 s5 0 -> 1 R s1
s3 1 -> 1 R s3
The listcomp_turing call with a tape containing "11" would be

listcomp_turing([((0, +1, None), (0, +1, 1)),
((0, +1, 2), (1, +1, 1)),
((1, -1, 3), (1, +1, 2)),
((0, -1, 4), (1, -1, 3)),
((1, +1, 0), (1, -1, 4))],
{0:1, 1:1})

which produces a result tape of

{0: 1, 1: 1, 2: 0, 3: 1, 4: 1}
Bernhard

--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
Jul 18 '05 #16
Xah Lee wrote:
is it possible to write python code without any indentation?


1) Why in the name of Xah Lee would you even want to?
2) If you need to ask questions this simple, are you sure you are the right
person to write tutorials?
3) Do you even read the replies you get?

--
Timo Virkkala
Jul 18 '05 #17
On Tue, 08 Feb 2005 20:47:06 +0100, Bernhard Herzog wrote:
[x for L in [[[initial_state, 0]]]
for state, pos in L
if state is not None
and (L.append([M[state][T.get(pos, 0)][2],
pos + M[state][T.get(pos, 0)][1]])
or T.__setitem__(pos, M[state][T.get(pos, 0)][0]))]
return T


I stand corrected!

Thanks for posting it; I wasn't going to ask anyone to produce one, but if
you had one lying around, that's great.

Nice job!
Jul 18 '05 #18
is it possible to write python code without any indentation?

Xah
You can, of course, write a silly little inline script without
any control structures that will all line up at the left
margain. So what?

John Roth


I agree, John, I don't get it. The vast majority of programmers (albiet
from my limited perspective) indent their code anyway, whether required by
the language or not. This was one of the first features of Python I
learned about that made me sit up and take notice -- here was a truly
pragmatic design choice that actually benefitted the programmer (by not
having to type all those delimiters).

Caleb
Jul 18 '05 #19
Timo Virkkala wrote:
Xah Lee wrote:
is it possible to write python code without any indentation?

1) Why in the name of Xah Lee would you even want to?
2) If you need to ask questions this simple, are you sure you are the
right person to write tutorials?
3) Do you even read the replies you get?

Surely by now it's obvious that Xah Lee is an output-only device. Please
do not feed the troll.

regards
Steve

Jul 18 '05 #20
Jeremy Bowers <je**@jerf.org> writes:

On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote:
Nick Vargish <na*******@bandersnatch.org> writes:

"Xah Lee" <xa*@xahlee.org> writes:

>is it possible to write python code without any indentation?

Not if Turing-completeness is something you desire.
Bernhard Herzog wrote:
.....
a Turing Machine in one line plus assignments - nice! Turns out that pypy is more
verbose than strictly necessary ;-)
....
BTW, I realized that it is indeed possible for a LC to maintain its own state
without being passed an external mutable. The trick is to use itertools.repeat
to return the same mutable object on each iteration.

So, here's factorial in one line:
# state refers to list of state history - it is initialized to [1]
# on any iteration, the previous state is in state[-1]
# the expression also uses the trick of list.append() => None
# to both update the state, and return the last state
[state.append(state[-1] * symbol) or state[-1] .... for symbol, state in it.izip(range(1,10),it.repeat([1]))
.... ]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]


Now, who was claiming that 'reduce' was opaque?

Michael ;-)

Jul 18 '05 #21
Michael Spencer wrote:
Jeremy Bowers <je**@jerf.org> writes:

On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote:

Nick Vargish <na*******@bandersnatch.org> writes:

>"Xah Lee" <xa*@xahlee.org> writes:
>
>>is it possible to write python code without any indentation?
>
>Not if Turing-completeness is something you desire.
Bernhard Herzog wrote:
....
a Turing Machine in one line plus assignments - nice! Turns out that

pypy is more verbose than strictly necessary ;-)
...
BTW, I realized that it is indeed possible for a LC to maintain its own state without being passed an external mutable. The trick is to use itertools.repeat to return the same mutable object on each iteration.


Pay attention, chief. I suggested this days ago to remove duplicates
from a list.

from itertools import *
[ x for (x,s) in izip(iterable,repeat(set()))
if (x not in s,s.add(x))[0] ]

;)

There is a way to even avoid repeat if you're feeling EVIL.

[ x for x in iterable if x not in locals()['_[1]'].__self__ ]

Turning this into a turing machine is left as an exercise. The recipe
in effect:

http://aspn.activestate.com/ASPN/Coo.../Recipe/204297
--
CARL BANKS

Jul 18 '05 #22
Carl Banks wrote:

Pay attention, chief. I suggested this days ago to remove duplicates
from a list.

from itertools import *
[ x for (x,s) in izip(iterable,repeat(set()))
if (x not in s,s.add(x))[0] ]

;)

Sorry, I gave up on that thread after the first 10 Million* posts. Who knows
what other pearls I may have missed?

Anyway, the good news is that you appear to have identified a new design
pattern, and will soon become very famous:

According to:
http://www.cmcrossroads.com/bradapp/...#Patterns_What

A "pattern" is ...

* An abstraction from a concrete form which keeps recurring in specific,
non-arbitrary contexts. [twice in one week]

* A recurring solution to a common problem [perl-python spam] in a given
context and system of forces.

* A named "nugget" of instructive insight, conveying the essence of a
proven solution to a recurring problem in a given context amidst competing
concerns. [who could doubt it?]

* A successfully recurring "best practice" that has proven itself in the
"trenches". [of this list anyway]

* A literary format for capturing the wisdom and experience of expert
designers, and communicating it to novices [I think we're 5 for 5]
So, I would get the book out without further delay, before some other
Johnny-come-lately lays claim.

BTW, Do you have a 1-line-LC-wiki yet?

Michael
* with due respect to Marvin
Jul 18 '05 #23
EP
------------Original Message------------
From: "Xah Lee" <xa*@xahlee.org> is it possible to write python code without any indentation?


Perhaps our zen-like response to this question should have been:
pass

Jul 18 '05 #24
Michael Spencer <ma**@telcopartners.com> writes:
So, here's factorial in one line:
# state refers to list of state history - it is initialized to [1]
# on any iteration, the previous state is in state[-1]
# the expression also uses the trick of list.append() => None
# to both update the state, and return the last state
>>> [state.append(state[-1] * symbol) or state[-1] ... for symbol, state in it.izip(range(1,10),it.repeat([1]))
... ]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880] >>>
There's no need for repeat:
[state.append(state[-1] * symbol) or state[-1]

for state in [[1]]
for symbol in range(1, 10)]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
While we're at it, a while back I posted a list comprehension that
implements a 'recursive' flatten:

http://groups.google.de/groups?selm=....intevation.de
Bernhard

--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
Jul 18 '05 #25
i thought it is trivial for the Python parser to spit out a version
with matching brackets. Similarly, perhaps some opensourcing student
has modified a parser to read in a matching brackets delimited version
of Python.

Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #26
Bernhard Herzog wrote:
Michael Spencer <ma**@telcopartners.com> writes:

So, here's factorial in one line:
# state refers to list of state history - it is initialized to [1]
# on any iteration, the previous state is in state[-1]
# the expression also uses the trick of list.append() => None
# to both update the state, and return the last state
>>> [state.append(state[-1] * symbol) or state[-1]

... for symbol, state in it.izip(range(1,10),it.repeat([1]))
... ]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
>>>

There's no need for repeat:

[state.append(state[-1] * symbol) or state[-1]


for state in [[1]]
for symbol in range(1, 10)]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
While we're at it, a while back I posted a list comprehension that
implements a 'recursive' flatten:

http://groups.google.de/groups?selm=....intevation.de
Bernhard

Much better - that also cleanly extends to any number of initializers. I also
like the approach you take in flatten (and as suggested by Carl Banks) of
putting the update mechanism in the if clause

So that gives:

def factorial(n):
return [state[-1]
for state in [[1]]
for count in xrange(1,n+1)
if state.append(state[-1] * count) or True
]

Probably of limited practical value, but fun to explore the language.
Thanks
Michael
Jul 18 '05 #27
Xah Lee wrote:
i thought it is trivial for the Python parser to spit out a version
with matching brackets. Similarly, perhaps some opensourcing student
has modified a parser to read in a matching brackets delimited version
of Python.


$ python Tools\scripts\pindent.py
You must specify -c(omplete), -d(elete) or -r(eformat)

usage: pindent (-c|-d|-r) [-s stepsize] [-t tabsize] [-e] [file] ...
-c : complete a correctly indented program (add #end directives)
-d : delete #end directives
-r : reformat a completed program (use #end directives)
-s stepsize: indentation step (default 8)
-t tabsize : the worth in spaces of a tab (default 8)
-e : expand TABs into spaces (defailt OFF)
[file] ... : files are changed in place, with backups in file~
If no files are specified or a single - is given,
the program acts as a filter (reads stdin, writes stdout).

Jul 18 '05 #28
On Wed, 09 Feb 2005 10:10:29 -0800 (PST), Xah Lee <xa*@xahlee.org> wrote:
i thought it is trivial for the Python parser to spit out a version
with matching brackets. Similarly, perhaps some opensourcing student
has modified a parser to read in a matching brackets delimited version
of Python.

Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Well, there's always the pindent.py script. Get the python source, and
look at Tools/scripts/pindent.py

This isn't an alternate parser, but it can turn a python script with
end-block comments and no indentation into a correctly indented python
script.

--
Sean Blakey
Saint of Mild Amusement, Evil Genius, Big Geek
Python/Java/C++/C(Unix/Windows/Palm/Web) developer
quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0])
Jul 18 '05 #29

Bernhard Herzog wrote:
Michael Spencer <ma**@telcopartners.com> writes:
So, here's factorial in one line:
# state refers to list of state history - it is initialized to [1]
# on any iteration, the previous state is in state[-1]
# the expression also uses the trick of list.append() => None
# to both update the state, and return the last state
>>> [state.append(state[-1] * symbol) or state[-1]

... for symbol, state in it.izip(range(1,10),it.repeat([1]))
... ]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
>>>


There's no need for repeat:
[state.append(state[-1] * symbol) or state[-1]

for state in [[1]]
for symbol in range(1, 10)]
[1, 2, 6, 24, 120, 720, 5040, 40320, 362880]

Nope, that's just too convenient. Now I'm going to end up doing this
all the time.
--
CARL BANKS

Jul 18 '05 #30
Jeremy Bowers wrote:
I can't figure out how to write a TM in a Python List Comprehension
without one of either "variable binding" (so we can store the last symbol
list and manipulate it in the next iteration) or "recursive function" (to
express the whole tape as a recursive function), both of which require
statements.


Lambdas can give you one-line functions, local variable
binding, if-then-else capabilities, and recursion. Everything
else should be possible from there.

As a fellow named Church once pointed out, lambdas are really
*all* you need in a language...

--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
Jul 18 '05 #31
Greg Ewing <gr**@cosc.canterbury.ac.nz> wrote:
As a fellow named Church once pointed out, lambdas are really
*all* you need in a language...


.... where as others argue that it is impractical not to have
some form of runtime data storage, thereby giving rise to the
separation of Church and state.

--
\S -- si***@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
Jul 18 '05 #32
Sion Arrowsmith wrote:
Greg Ewing <gr**@cosc.canterbury.ac.nz> wrote:
As a fellow named Church once pointed out, lambdas are really
*all* you need in a language...

... where as others argue that it is impractical not to have
some form of runtime data storage, thereby giving rise to the
separation of Church and state.

--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
Jul 18 '05 #33

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tero Pihlajakoski | last post by:
Hi, I've been experimenting on embedding Python to a C software, and ran into a little problem with PYTHONPATH (I'm running on linux). Here's the deal: When trying to call...
105
by: Peter Hickman | last post by:
Well after all this discussion it would appear that a 'Python like' language has appeared => Prothon. http://www.prothon.org/index.html Very alpha, sort of like Python (if you consider the...
145
by: David MacQuigg | last post by:
Playing with Prothon today, I am fascinated by the idea of eliminating classes in Python. I'm trying to figure out what fundamental benefit there is to having classes. Is all this complexity...
77
by: Hunn E. Balsiche | last post by:
in term of its OO features, syntax consistencies, ease of use, and their development progress. I have not use python but heard about it quite often; and ruby, is it mature enough to be use for...
147
by: Sateesh | last post by:
Hi, I am a beginner in Python, and am wondering what is it about the indentation in Python, without which python scripts do not work properly. Why can't the indentation not so strict so as to give...
39
by: Jack | last post by:
I wonder what everybody uses for Python editor/IDE on Linux? I use PyScripter on Windows, which is very good. Not sure if there's something handy like that on Linux. I need to do some development...
27
by: scott | last post by:
Hi all, I have been looking at the various programming languages available. I have programed in Basic since I was a teenager and I also have a basic understanding of C, but I want something...
13
by: John Dann | last post by:
A Python newbie, but some basic understanding of how classes, objects etc work in eg VB.Net. However, I'm struggling a little to translate this knowledge into the Python context. I'm trying to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.