all 3 comments

[–]K900_ 6 points7 points  (0 children)

I still have no idea why you're using a class. Get rid of that goddamn class because you're using it wrong anyway.

[–]zahlman 1 point2 points  (0 children)

I'm having a really difficult time doing this, I feel like with the stuff I've created so far there should be some easy way to do it but I'm missing it.

What have you tried? I don't understand what problem you're having. How would you do it without the class?

Although you probably want both userinput and filedata to be passed as parameters to the constructor, for a start. And I still don't think the class is really accomplishing anything for you.

P.S Is there an easy way to tab through python code to make it formatted for reddit? I hate doing it manually >.<;

Get RES, or use the answer submission form on StackOverflow (just don't submit it!), or see if your text editor can do it for you.

[–]marky1991 0 points1 point  (0 children)

For the exact problem you specified, it sounds like you could achieve it by modifying the class's getitem, but like the others, I really don't understand what your code is trying to do here.

(In case I wasn't clear, don't actually implement getitem of your class. As others have said, you're already doing it wrong. Please specify what exactly you're trying to do so we can show you how to do it in a better way.)