On 13/09/13 11:24, Dotan Cohen wrote:
A function that I wrote works on a list or on a string. If the
function is passed a string, then it wraps the string in a list at the
top of the function. Is it bad form to wrap the string in place?
It depends what your function does. In most cases the stri
On 13/09/13 15:59, Paul Smith wrote:
So there are many tools out there but mechanize and scrapy 3rd party
modules seem to produce the best results; however nothing like these
exist for Python3. I get close but cannot produce the clean simple url
results in python3
Yes that's the biggest barrie
Attempting a simple web crawler in python3, browse a url -
collect/clean/produce valid url list from a url; random choice from valid
url list; visit new url repeat process - collect/clean/produce valid url
list from new url...
So there are many tools out there but mechanize and scrapy 3rd party
mo
On Fri, Sep 13, 2013 at 12:24:40PM +0200, Dotan Cohen wrote:
> A function that I wrote works on a list or on a string. If the
> function is passed a string, then it wraps the string in a list at the
> top of the function. Is it bad form to wrap the sting in place?
>
> if not isinstance(someVar, li
On 13/9/2013 06:24, Dotan Cohen wrote:
> A function that I wrote works on a list or on a string. If the
> function is passed a string, then it wraps the string in a list at the
> top of the function. Is it bad form to wrap the sting in place?
>
> if not isinstance(someVar, list):
> someVar = [
On 13 September 2013 11:24, Dotan Cohen wrote:
> A function that I wrote works on a list or on a string. If the
> function is passed a string, then it wraps the string in a list at the
> top of the function. Is it bad form to wrap the sting in place?
>
> if not isinstance(someVar, list):
> som
A function that I wrote works on a list or on a string. If the
function is passed a string, then it wraps the string in a list at the
top of the function. Is it bad form to wrap the sting in place?
if not isinstance(someVar, list):
someVar = [someVar]
To avoid that, I am creating a list then