Keyword argument 'from'; invalid syntax

Kai Kuehne kai.kuehne at gmail.com
Thu Jul 26 03:33:20 CEST 2007


Hi list!
I'm using pygmalion (magnolia api access lib) and want to
use the following method that it is offering:

magnolia.bookmarks_find(person='user', from=some_datetime)

As you may noticed, from is a keyword argument and so I
get the following error message from python:

   File "<ipython console>", line 1
     magnolia.bookmarks_find(person='user', from=some_datetime)
                                                                  ^
<type 'exceptions.SyntaxError'>: invalid syntax

I have tried to prepare a dict and then passing it to the
method afterwards:
>>> d = {'person': 'user', 'from': vorgestern}
>>> magnolia.bookmarks_find(d)
<type 'exceptions.TypeError'>: bookmarks_find() takes exactly 1
argument (2 given)

I'm out of ideas so help is greatly appreciated!
Thanks
Kai



More information about the Python-list mailing list