William Dode wrote:
> Hi,
> 
> For an unknown var, query and post doesn't answer the same. Is there 
> a reason for this ?
> 
> In [18]: req = Request.blank('')
> 
> In [19]: req.queryvars.get('unknown','?')
> Out[19]: '?'
> 
> In [20]: req.queryvars.get('unknown')    
> 
> In [21]: req.postvars.get('unknown','?')
> ---------------------------------------------------------------------------
> exceptions.AttributeError                            Traceback (most recent 
> call                                                                last)

Hmm... your line numbers don't match up with mine, though maybe it's 
because I added a bunch of docstrings last night.  I don't think I've 
done anything meaningful to this code lately.

But I'm not able to reproduce your problem.  Here's the doctest I tried:


     >>> req = Request.blank('/')
     >>> req.queryvars.get('unknown')
     >>> req.queryvars.get('unknown', '?')
     '?'
     >>> req.postvars.get('unknown')
     >>> req.postvars.get('unknown', '?')
     '?'
     >>> req.params.get('unknown')
     >>> req.params.get('unknown', '?')
     '?'


It passes fine for me.  Is there something else I'm missing?


-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
             : Write code, do good : http://topp.openplans.org/careers

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to