Search Results

Showing results 1 to 7 of 7
Search took 0.00 seconds.
Search: Posts Made By: drjay1627 ; Forum: Python and child forums
Forum: Python Jun 18th, 2009
Replies: 2
Views: 211
Posted By drjay1627
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
Posted By drjay1627
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
Posted By drjay1627
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
Posted By drjay1627
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
Posted By drjay1627
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
Solved: Trie
Views: 515
Posted By drjay1627
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
Solved: Trie
Views: 515
Posted By drjay1627
I'm trying to code a Trie in Python. Any suggestions as to where I should begin?

drjay
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC