<p>Let's say I have a class that has a member called data which is a list.  </p>

<p>I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list.</p>

<p>What's your technique for doing this?</p>

<p>Do you just check the type by looking at <code>__class__</code>?</p>

<p>Is there some trick I might be missing?</p>

<p>I'm used to C++ where overloading by argument type is easy. </p>

A better way would be to use isinstance and type conversion. If I'm understanding you right, you want this:
```
```
def __init__ (self, filename):
    if isinstance (filename, basestring):
        # filename is a string
    else:
        # try to convert to a list
        self.path = list (filename)
```
```