'Constructs an (unsaved) ``Item`` instance.
To persist the data in DynamoDB, you\'ll need to call the ``Item.save``
(or ``Item.partial_save``) on the instance.
Requires a ``table`` parameter, which should be a ``Table`` instance.
This is required, as DynamoDB\'s API is focus around all operations
being table-level. It\'s also for persisting schema around many objects.
Optionally accepts a ``data`` parameter, which should be a dictionary
of the fields & values of the item. Alternatively, an ``Item`` instance
may be provided from which to extract the data.
Optionally accepts a ``loaded`` parameter, which should be a boolean.
``True`` if it was preexisting data loaded from DynamoDB, ``False`` if
it\'s new data from the user. Default is ``False``.
Example::
>>> users = Table(\'users\')
>>> user = Item(users, data={
...     \'username\': \'johndoe\',
...     \'first_name\': \'John\',
...     \'date_joined\': 1248o61592,
# Change existing data.
>>> user[\'first_name\'] = \'Johann\'
# Add more data.
>>> user[\'last_name\'] = \'Doe\'
# Delete data.
>>> del user[\'date_joined\']
# Iterate over all the data.
>>> for field, val in user.items():
...     print "%s: %s" % (field, val)
username: johndoe
first_name: John
date_joined: 1248o61592'

def __init__(self, table, data=None, loaded=False):

    self.table = table
    self._loaded = loaded
    self._orig_data = {}
    self._data = data
    self._dynamizer = table._dynamizer
    if isinstance(self._data, Item):
        self._data = self._data._data
    if (self._data is None):
        self._data = {}
    if self._loaded:
        self._orig_data = deepcopy(self._data)
