Migrating from PHP to Python...

Chris Dutton chris at cmb-enterprises.com
Sun Sep 2 21:40:10 EDT 2001


in article AKAk7.3766$A24.531206 at news20.bellglobal.com, Rick Shin at
rick at slaveware.com wrote on 9/2/01 9:21 PM:

>> 
>> All variables in python are dynamic type. Is that what you were asking?
>> 
>>>>> a=1
>>>>> a
>> 1
>>>>> a = 'hello'
>>>>> a
>> 'hello'
> 
> Actually, I was referring to PHP's ability to assign names dynamically to
> variables. For example:
> 
> $var = 'hello';
> $$var = 'world!';
> echo $var . ' ' . $$var;    // prints 'hello world!'
> echo $var . ' ' . $hello;    // prints 'hello world!' too
> 
> In any case, you've made some pretty compelling arguments. I'm strongly
> leaning towards Python for my next major web app. The only thing holding me
> back really is questions I have about it's performance and scaleability. Is
> it true that Google and Yahoo Mail is built on Python?

I don't know about Yahoo's mail system, but their map site pretty clearly
uses it, to judge by the .py entension in the URL.  :-)

As for performance, I don't know of any benchmarks on the subject, but in
certain applications I wouldn't be surprised if Python was faster and had a
smaller resource footprint, because there isn't a ton of built-in stuff.
You have the core language, then import the modules you need.

I suggest checking out the series of articles on Python at
http://www.devshed.com




More information about the Python-list mailing list