I wanted to get a way to inspect the value of variables when a function was called without modifying the code. I tested it on a simple function, and it does what I wanted.
--------------------------------------------------------------------------------
date: '2014-07-11T23:59:00+07:00'
doc: <Element {http://www.w3.org/1999/xhtml}html at 0x10c180638>
DATETYPE: 'created'
finddate: string(//__xpp1:time[@class='created']/@datetime)
Returned: '2014-07-11T23:59:00+07:00'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
date: '2014-09-08T18:21:00+09:00'
doc: <Element {http://www.w3.org/1999/xhtml}html at 0x10c180638>
DATETYPE: 'modified'
finddate: string(//__xpp1:time[@class='modified']/@datetime)
Returned: '2014-09-08T18:21:00+09:00'
--------------------------------------------------------------------------------