Re: Python Basic Doubt
Hello,
El 10/08/2013 18:40, Tim Chase escribió:
Generally, if you are using the "is" operator to compare against
anything other than None, you're doing it wrong. There are exceptions
to this, but it takes knowing the particulars.
Now I have one doubt, I use 'is' to compare basic types in python 3, for
example .-
v = []
if type(v) is list:
print('Is list...')
Because I think it is more clear and faster than .-
type(v) == [].__class__ ... or ... isinstance(v, list)
Is this correct?
Thanks.
--
Xavi
--
http://mail.python.org/mailman/listinfo/python-list
Re: Python Basic Doubt
Thanks to all for your answers, I guess it is more flexible with isinstance (the duck test :) I'm going to change the type checks. Respect to the "Names starting and ending with double-underscore". I don't know how to get the name of a classe without them. obj.__class__.__name__ Thanks. -- Xavi -- http://mail.python.org/mailman/listinfo/python-list
Re: Options ExecCGI is off in this directory:
You do not say the version of apache. If it's the 2.4 must change "allow from all" to "Require all granted". HTH -- Xavi El 16/08/2013 12:28, [email protected] escribió: Hello, I am desperately trying to get my python script running, but I alway get a 403-Error. apache logfile says: Options ExecCGI is off in this directory:/home/user12/cgi-bin/showblogs.py - apache configuration: AllowOverride None AddType application/python .py DirectoryIndex index.html index.htm index.php index.py Options +ExecCGI Indexes FollowSymLinks MultiViews AddHandler cgi-script .cgi .pl .py AllowOverride All Order allow,deny allow from all So what is missing or wrong here? thanx for your help, Helmut -- http://mail.python.org/mailman/listinfo/python-list
