grimofdoom's Profile User Rating: -----

Reputation: 1 Apprentice
Active Posts:
16 (0.02 per day)
14-August 12
Profile Views:
Last Active:
User is offline Jul 19 2014 09:36 PM

Previous Fields

Dream Kudos:
Icon   grimofdoom has not set their status

Posts I've Made

  1. In Topic: Help with append list -> dict

    Posted 14 Jul 2014

    As I read it, it sounds almost exactly what i am currently trying to do-but more technical and strange. What i have now up there works if I take the function 'info' out of the class(and remove 'self'),but as it is now,does not work. I am trying to make it as easy as possible and doing ',wanted_element)' would be easier to understand than using just info outside of the class. But as I said, i get an error:
    Traceback (most recent call last):
      File "C:\Users\Admin\Desktop\Pokemon Mengakana\", line 399, in <module>,0)
    TypeError: unbound method info() must be called with Pokemon instance as first argument (got int instance instead)

    I have the function inside the class and include the 'self' when needed.
  2. In Topic: Help with append list -> dict

    Posted 14 Jul 2014

    I feel kinda stupid now of not thinking i could add tuple to new list and search through that new list. I want to add a function to my class to speed up and make things easier when finding a specific spot. When i create the function outside of the class, it works. But if i insert it into the class(+ adding self to top) and change the calling of it to include the class name, it spits out an error saying Pokemon must be called before info (got int instead)
    import operator
    class Pokemon(object):
        def __init__(self,name):
        def info(self,pokemon,place):
            print 'name:',found[0]
            print 'Chosen Spot:',found[place],0)

    (i honestly feel stupid about the previous post and how wasteful of space it is. Though,searching the web has found no results that have worked. All the ones I come to say i should do something like '' or of the sort. Did not work doing that either. I would be really appreciate if I could get this last piece of the puzzle found and placed, with this i should be able to do everything else i planned)
  3. In Topic: Help with append list -> dict

    Posted 14 Jul 2014

    I think it is not exactly what you meant,but i do think i kinda figured out what you mean:
    class Pokemon(object):
        def __init__(self,name):
    print Pokemon.find[5]

    I can grab the entire row, but now i am back to,kinda of, what was earlyier asked. From this point i can find the '[5]',but now how can i grab an element from it. I using 'print Pokemon.find[5[0]]',which then says:
    TypeError: 'int' object has no attribute '__getitem__'

    I tried switching my list to a dict, but still came with the same error. i have tried looking around and do not understand,yet, how it can be done.
  4. In Topic: Help with append list -> dict

    Posted 14 Jul 2014

    So I am trying to understand what your saying. I went around (using google) looking at static class attributes, and came up to find only static variables mentioned so I'm am guessing it's the same thing., and going off what you said, I should put those variables (john=123,doe=456) into a dict with a function so it ends up as get{john:123,doe:456}
    As I read it, and the other articles I've been finding, a lot of it is confusing.(btw,probably a little late,by my pokemon has more than just an id and name, inside it also contains stuff like its base stats(used to determine actual stats based on leveling mixed with other vars),it's rate of experience gain and the element types(2 spots taken by this))
  5. In Topic: Help with append list -> dict

    Posted 14 Jul 2014

    As it is still relatated to here, i have come to a problem. The website i have been using for learning the oo programming with python does not tell me how to find an instance by its attribute. And googling it has come to no usable answer even similar. I have built a lot of instances using a def in my main class, now i want to locate a single instance by an attribute. (i know your saying that, what if other have the same attribute, yes there are some attributes that share,but i have 2 attributes that are different. One containing name(pokemon) and other using it's ID) using this as an example:
    class Who(object):
        def __init__(self,name,id):
        def show_person(self,name,id)
            print 'name:',,' ID:',

    (imagine that there was 100 others than just person1 and person2)
    from that example, how can i retrieve person1, by looking for the id 123?
    (i have been using http://www.tutorials...ses_objects.htm as a learning point for oo)

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown

Contact Information

Click here to e-mail me


grimofdoom hasn't added any friends yet.


grimofdoom has no profile comments yet. Why not say hello?