Earlier quoted context omitted.
Lambda calculus is beautiful, but modern computers are not lambda machines.
Is there a problem which can be solved in Lambda Calculus that cannot be solved in a Turing Machine?
What’s New in Python 3.0
21–30 of 43 posts
Re: What’s New in Python 3.0
#22Earlier quoted context omitted.
Is there a problem which can be solved in Lambda Calculus that cannot be solved in a Turing Machine?
A Lambda machine can be implemented using a Turing machine, but not the other way around, which means, Lambda calculus is a subset. Correct me if I'm wrong.
Re: What’s New in Python 3.0
#23is hex(-1) still '-0x1' ?
In [1]: hex(-True)
Out[1]: '-0x1'Re: What’s New in Python 3.0
#24I really wish they had added real lambdas. Don't get me wrong, these changes seem good. But every time I hear about a new Python release I keep hoping that I'll see they've finally reversed their policy about lambdas and made a real one instead of the compromise they have right now.
what does a real one consitute of? and why do you want that? i use pyhton as a superb general-purpose language and for gluing together a lot of different parts of software/programs. for that purpose, simplicity and readability is essential.
Re: What’s New in Python 3.0
#25Instead of print("string") I would have liked to see fn op1 op2 to be the standard function invocation - like in Haskell. (I know that would have wreaked havoc with the rest of Python's syntax.)
Re: What’s New in Python 3.0
#26Are they going to abandon the 'Format %d:%s" % (n, s)' or just add PEP 3101? The % syntax is down-and-dirty practical good. PEP 3101 is neat, but printf() syntax is tough to beat.
OK, the first screenful or so scared me. The rest looks like clear-cut improvements.
So far, I've loved Python's balance between simple purity and down-and-dirty pragmatism. I sure hope they don't shift too far toward purity.
Re: What’s New in Python 3.0
#27WTF? Why doesn't the new repr(1L) return "1L"? I thought the whole point of the repr custom was to output something that would regenerate the same object. Are they going to abandon the 'Format %d:%s" % (n, s)' or just add PEP 3101? The % syntax is down-and-dirty practical good. PEP 3101 is neat, but printf() syntax is tough to beat. OK, the first screenful or so scared me. The rest looks like clear-cut improvements.…
Because there's no such thing as 1L anymore. There is one unified (unbounded) integer, and I believe the C implementation will use int to represent small values and long when necessary (and list of long beyond that?).
Are they going to abandon the 'Format %d:%s" % (n, s)' or just add PEP 3101? The % syntax is down-and-dirty practical good. PEP 3101 is neat, but printf() syntax is tough to beat.
I'm a little worried about this as well. I just wrote a ctemplate module that leverages % syntax a lot, so it would be quite unfortunate to see it disappear.
In other words, you could write code like:
char * months[%(len(pyvar_months))d];
My module uses string interpolation on this file, but it defines a special class with a __getitem__ method that instead of simply returning the associated string (as a dict would), it evaluates an arbitrary Python expression. And it works! It's pretty cool to be able to mix C and Python in this way to more easily write C code.That may seem minor, but I've used the same framework to be able to say:
%(array; char *; months; ['"%s"' % (mo,) for mo in pyvar_months])s
Assuming that pyvar_months is ["January", "February", "March", ..., "December"]
(in Python), the automatically-generated C result will be: /* header file */
extern char * months[12];
/* C file */
char * months[12] = {
"January",
"February",
"March",
...,
"December"
};
Okay, sorry to go so off topic, but I really wanted to show that it's possible to use the current string interpolation functionality to do really cool stuff, and it would be a shame to see that change.Re: What’s New in Python 3.0
#28Re: What’s New in Python 3.0
#29Earlier quoted context omitted.
print >>sys.stderr, "fatal error" Considering this is this old version of what you copied, I don't think anything has been lost...
I never liked that either, but the new version is physically longer and requires more typing. Moreover, I couldn't find any change in 3.0 that results in less typing. I might have missed something of course, but this announcement doesn't seem to be something to be excited about. I was waiting, for example, lambdas to be allowed to have compound statements. Python, a nice language otherwise, could have been improved i…
Isn't that one of the main themes of Python? That you can expect another programmer to have solved the same problem almost the same way..? I figure this is how that happens.
Re: What’s New in Python 3.0
#30Earlier quoted context omitted.
I never liked that either, but the new version is physically longer and requires more typing. Moreover, I couldn't find any change in 3.0 that results in less typing. I might have missed something of course, but this announcement doesn't seem to be something to be excited about. I was waiting, for example, lambdas to be allowed to have compound statements. Python, a nice language otherwise, could have been improved i…
> you are not supposed to do this, says Python to you, because it's a bad practice and can lead to errors. Isn't that one of the main themes of Python? That you can expect another programmer to have solved the same problem almost the same way..? I figure this is how that happens.