Hello everyone!
i have the following test code:
class temp:
def __init__(self):
self.hello = "hello world!"
def printworld(self):
print(self.hello)
t = temp()
and i tried to call profile('t.printworld()')
but i received the following error:
Traceback (most recent call last
John Machin wrote:
>
> That's because it "falls off the end" of the function, which causes it
> to return None. However that's not your only problem. Major other
> problem is updating "seed" in situ.
>
I'm not sure what "falls off the end" of the function means, i searched
online, it seems to mean
hello, i have another problem i feel that i have to be missing
something.. Basically, i've written a recursive function to find all
the prime up to a number (lim).. here is the function:
The function basically takes in a list of all the prime number found,
it takes the next number to be tested for
hello everyone! I can't seem to find a function that combines a list of
items into a string with a seperator between the individual elements..
Is there such a method that does the opposite of sting.split? thanks
alot!
--
http://mail.python.org/mailman/listinfo/python-list
hello, recently i tried to use list.append() function in seemingly
logical ways, however, i cannot get it to work, here is the test code:
>>> seed = [2, 3, 4, 5]
>>> next = 7
>>> seed1 = seed.append(next)
>>> seed1
>>> print(str(seed1))
None
>>> def test(lst):
... print(str(lst))
...
>>> test(
hi, does anyone know of any package that will download a full site for
offline viewing? It will change all url to match local urls and follow
a logical structure (the site's structure would be suffice).. Please
tell me if you have heard of such a package.. thanks alot :D
--
http://mail.python.org
ah, result = reTest(True) works, thanks alot :D
--
http://mail.python.org/mailman/listinfo/python-list
the final returned value is: []
the two values printed is (note i only have one print statement
printing "print result",. however, in the actualality, it's printed
twice):
printing result:
['should be the only thing returned']
printing result:
[]
therefore, sadly, i don't thinkg you've understand
hi, i have the following recursive function (simplified to demonstrate
the problem):
>>> def reTest(bool):
... result = []
... if not bool:
... reTest(True)
... else:
... print "YAHHH"
... result = ["should be the only thing returned"]
... print
ah, wb works :D thanks alot!
--
http://mail.python.org/mailman/listinfo/python-list
hi, i want to automate some tasks of gathering photos from web, i tried
urllib/urllib2, both ended up without much success (saved gifs with
only a border, nothing else)..
the code i used was:
>>> data =
>>> urllib2.urlopen("http://aspn.activestate.com/ASPN/img/komodo_aspn_other.gif";)
>>> #was
hi, does anyone know of a library that can query domain registry or any
site that provide information to such an activity? as i want to build a
simple domain name searching program for my own benefit.. thanks alot :D
--
http://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo