Forum: Python Jun 18th, 2009 |
| Replies: 2 Views: 211 I have a recursive function. My base case is:
somemethod(somelist)
if len(somelist) == 0
return
...
This is suppose to return the function to the place where it was called from. |
Forum: Python Jun 17th, 2009 |
| Replies: 1 Views: 204 Follows,
I need some help with fixing a bug in my program. I can't post the entire code here as its an on going assignment.
I'm building a Tree in Python.
class Tree:
def __init__(self,... |
Forum: Python Jun 17th, 2009 |
| Replies: 7 Views: 367 This is what I did:
class MyClass:
def __init__(self, f, r):
self.first = f
self.rest = r
def main(argv = sys.argv):
newclass = MyClass(" ", []) |
Forum: Python Jun 15th, 2009 |
| Replies: 7 Views: 367 Thanks mate cheers!
I was doing some research last night and I found this:
from collections import namedtuple
namedtuple("MyClass", "foo bar")
MyClass(foo=1, bar=2) |
Forum: Python Jun 14th, 2009 |
| Replies: 7 Views: 367 hello,
I wanna create a struct in python. the struct needs to have a char and an array of chars.
eg. (ruby code):
Somestruct = Struct .new(:character, :characterArray)
structure =... |
Forum: Python Jun 4th, 2009 |
| Replies: 4 Views: 515 Well I did that and I know what a Trie is. But coding it in a language you haven't used before is a challenge. I just want to know, when programing a data structure where do I begin. I already did... |
Forum: Python Jun 4th, 2009 |
| Replies: 4 Views: 515 I'm trying to code a Trie in Python. Any suggestions as to where I should begin?
drjay |