Omer wrote:
> Hey.
>
> I'm trying to do something I think is basic and am failing.
>
> The goal is:
> [mimicking the google urlopen syntax]
>
> try:
> from google.appengine.api.urlfetch import fetch
> except:
> from urllib import urlopen as fetch
>
>
> How do I add this "fetch" the
There are three ways as I see it: using __getattr__, using a new init,
or using a property decorator. The last two are probably the most
pythonic, but I'm not familiar with decorators, so here's how I'd do
the second of the three:
try:
from google.appengine.api.urlfetch import fetch
except:
Hey.
I'm trying to do something I think is basic and am failing.
The goal is:
[mimicking the google urlopen syntax]
try:
from google.appengine.api.urlfetch import fetch
except:
from urllib import urlopen as fetch
How do I add this "fetch" the property of content?
I basically want fetc