Created: (MODPYTHON-239) StringField comparisons ignore
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Created: (MODPYTHON-239) StringField comparisons ignore




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Created: (MODPYTHON-239) StringField comparisons ignore  
Bobby Schaetzle (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-18-07 12:12 AM

StringField comparisons ignore field name
-----------------------------------------

Key: MODPYTHON-239
URL: https://issues.apache.org/jira/browse/MODPYTHON-239
Project: mod_python
Issue Type: Bug
Affects Versions: 3.3.1
Reporter: Bobby Schaetzle


Comparisons between StringField instances fall back on the default str compa
rator.  This means that two StringField objects with the same value will com
pare as equal, even if they represent two different form fields.  This manif
ests itself most obviously
when trying to delete items by key from the FieldStorage table:

import mod_python
form = mod_python.util.FieldStorage(req)
form.add_field("foo", "bogleg")
form.add_field("bar", "bogleg")
print "before=" + repr(form.list)
del form["bar"]
print "after=" + repr(form.list)

outputs:

before=[Field('foo', 'bogleg'), Field('bar', 'bogleg')]
after=[Field('bar', 'bogleg')]







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:53 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register