Index: /main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py	(revision 9701)
@@ -146,14 +146,14 @@
         errs, inv_errs, conv_dict =  converter.fromStringDict(
             row, self.factory_name, mode=mode)
-        if row.has_key('transition') and row.has_key('state'):
+        if 'transition' in row and 'state' in row:
             if row['transition'] not in (IGNORE_MARKER, '') and \
                 row['state'] not in (IGNORE_MARKER, ''):
                 errs.append(('workflow','not allowed'))
                 return errs, inv_errs, conv_dict
-        if row.has_key('transition'):
+        if 'transition' in row:
             if row['transition'] not in IMPORTABLE_TRANSITIONS:
                 if row['transition'] not in (IGNORE_MARKER, ''):
                     errs.append(('transition','not allowed'))
-        if row.has_key('state'):
+        if 'state' in row:
             if row['state'] not in IMPORTABLE_STATES:
                 if row['state'] not in (IGNORE_MARKER, ''):
@@ -188,5 +188,5 @@
         # Update state
         # Attention: When importing states the counters remain unchanged.
-        if row.has_key('state'):
+        if 'state' in row:
             state = row.get('state', IGNORE_MARKER)
             if state not in (IGNORE_MARKER, ''):
@@ -198,5 +198,5 @@
             row.pop('state')
         # Trigger transition. Counters are properly changed.
-        if row.has_key('transition'):
+        if 'transition' in row:
             transition = row.get('transition', IGNORE_MARKER)
             if transition not in (IGNORE_MARKER, ''):
@@ -209,5 +209,5 @@
         # random_num string to avoid annoying automatic number transformation
         # by Excel or Calc
-        if row.has_key('random_num'):
+        if 'random_num' in row:
             random_num = row.get('random_num', IGNORE_MARKER)
             if random_num not in (IGNORE_MARKER, ''):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py	(revision 9701)
@@ -226,5 +226,5 @@
         items_changed = ''
         # Remove application_number from row if empty
-        if row.has_key('application_number') and row['application_number'] in (
+        if 'application_number' in row and row['application_number'] in (
             None, IGNORE_MARKER):
             row.pop('application_number')
@@ -232,5 +232,5 @@
         # Update applicant_id fom application_number and container code
         # if application_number is given
-        if row.has_key('application_number'):
+        if 'application_number' in row:
             obj.applicant_id = u'%s_%s' % (
                 row['container_code'], row['application_number'])
@@ -239,5 +239,5 @@
 
         # Update password
-        if row.has_key('password'):
+        if 'password' in row:
             passwd = row.get('password', IGNORE_MARKER)
             if passwd not in ('', IGNORE_MARKER):
@@ -252,5 +252,5 @@
 
         # Update registration state
-        if row.has_key('state'):
+        if 'state' in row:
             state = row.get('state', IGNORE_MARKER)
             if state not in (IGNORE_MARKER, ''):
@@ -306,5 +306,5 @@
             if cert.application_category != parent.application_category:
                 errs.append(('course1', 'wrong application category'))
-        if row.has_key('state') and \
+        if 'state' in row and \
             not row['state'] in IMPORTABLE_STATES:
             if row['state'] not in (IGNORE_MARKER, ''):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 9701)
@@ -169,5 +169,5 @@
     def delApplicantsContainers(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -417,5 +417,5 @@
     def delApplicant(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -442,5 +442,5 @@
     def createStudents(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -849,5 +849,5 @@
     def delPaymentTickets(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 9701)
@@ -123,5 +123,5 @@
 def delSubobjects(view, redirect, tab=None, subcontainer=None):
     form = view.request.form
-    if form.has_key('val_id'):
+    if 'val_id' in form:
         child_id = form['val_id']
     else:
@@ -242,5 +242,5 @@
             # has been set.
             login = self.request.form['form.login']
-            if len(login) == 8 and grok.getSite()['students'].has_key(login):
+            if len(login) == 8 and login in grok.getSite()['students']:
                 student = grok.getSite()['students'][login]
                 password = self.request.form['form.password']
@@ -841,5 +841,5 @@
     def delFiles(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py	(revision 9701)
@@ -316,12 +316,12 @@
         # former_course attribute of the corresponding course is set.
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.assertTrue(self.app['faculties']['fac1']['dep1'].certificates[
-            'CERT1'].has_key('COURSE1_100'))
+        self.assertTrue('COURSE1_100' in self.app[
+            'faculties']['fac1']['dep1'].certificates['CERT1'])
         self.browser.open(
             'http://localhost/app/faculties/fac1/dep1/courses/COURSE1/manage')
         self.browser.getControl(name="form.former_course").value = ['selected']
         self.browser.getControl("Save").click()
-        self.assertFalse(self.app['faculties']['fac1']['dep1'].certificates[
-            'CERT1'].has_key('COURSE1_100'))
+        self.assertFalse('COURSE1_100' in self.app[
+            'faculties']['fac1']['dep1'].certificates['CERT1'])
         return
 
@@ -330,11 +330,11 @@
         # the corresponding course is removed.
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.assertTrue(self.app['faculties']['fac1']['dep1'].certificates[
-            'CERT1'].has_key('COURSE1_100'))
+        self.assertTrue('COURSE1_100' in self.app[
+            'faculties']['fac1']['dep1'].certificates['CERT1'])
         self.browser.open('http://localhost/app/faculties/fac1/dep1/manage')
         ctrl = self.browser.getControl(name='val_id')
         ctrl.getControl(value='COURSE1').selected = True
         self.browser.getControl("Remove selected", index=0).click()
-        self.assertFalse(self.app['faculties']['fac1']['dep1'].certificates[
-            'CERT1'].has_key('COURSE1_100'))
-        return
+        self.assertFalse('COURSE1_100' in self.app[
+            'faculties']['fac1']['dep1'].certificates['CERT1'])
+        return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 9701)
@@ -150,5 +150,5 @@
     def delHostels(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             deleted = []
             child_id = form['val_id']
@@ -285,5 +285,5 @@
     def switchReservations(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -315,5 +315,5 @@
     def releaseBeds(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 9701)
@@ -119,5 +119,5 @@
                         bt = u'%s_%s_%s' % (self.special_handling,sex,bt)
                         uid = u'%s_%s_%d_%s' % (self.hostel_id,block,room_nr,bed)
-                        if self.has_key(uid):
+                        if uid in self:
                             bed = self[uid]
                             # Renumber remaining beds
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 9701)
@@ -148,5 +148,5 @@
         # We have to log this if state is provided. If not,
         # logging is done by the event handler handle_student_added
-        if row.has_key('state'):
+        if 'state' in row:
             parent.logger.info('%s - Student record created' % obj.student_id)
         history = IObjectHistory(obj)
@@ -191,11 +191,10 @@
 
         # Remove student_id from row if empty
-        if row.has_key('student_id') and row['student_id'] in (
-            None, IGNORE_MARKER):
+        if 'student_id' in row and row['student_id'] in (None, IGNORE_MARKER):
             row.pop('student_id')
 
         # Update password
-        # XXX: Tale DELETION_MARKER into consideration
-        if row.has_key('password'):
+        # XXX: Take DELETION_MARKER into consideration
+        if 'password' in row:
             passwd = row.get('password', IGNORE_MARKER)
             if passwd not in ('', IGNORE_MARKER):
@@ -210,5 +209,5 @@
 
         # Update registration state
-        if row.has_key('state'):
+        if 'state' in row:
             state = row.get('state', IGNORE_MARKER)
             if state not in (IGNORE_MARKER, ''):
@@ -221,5 +220,5 @@
             row.pop('state')
 
-        if row.has_key('transition'):
+        if 'transition' in row:
             transition = row.get('transition', IGNORE_MARKER)
             if transition not in (IGNORE_MARKER, ''):
@@ -274,9 +273,9 @@
         errs, inv_errs, conv_dict =  converter.fromStringDict(
             row, self.factory_name, mode=mode)
-        if row.has_key('transition'):
+        if 'transition' in row:
             if row['transition'] not in IMPORTABLE_TRANSITIONS:
                 if row['transition'] not in (IGNORE_MARKER, ''):
                     errs.append(('transition','not allowed'))
-        if row.has_key('state'):
+        if 'state' in row:
             if row['state'] not in IMPORTABLE_STATES:
                 if row['state'] not in (IGNORE_MARKER, ''):
@@ -438,6 +437,5 @@
             StudentStudyCourseProcessor, self).checkConversion(row, mode=mode)
         # We have to check if current_level is in range of certificate.
-        if conv_dict.has_key('certificate') and \
-            conv_dict.has_key('current_level'):
+        if 'certificate' in conv_dict and 'current_level' in conv_dict:
             cert = conv_dict['certificate']
             level = conv_dict['current_level']
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9701)
@@ -528,5 +528,5 @@
     def save(self, **data):
         form = self.request.form
-        if form.has_key('transition') and form['transition']:
+        if 'transition' in form and form['transition']:
             transition_id = form['transition']
             wf_info = IWorkflowInfo(self.context)
@@ -957,5 +957,5 @@
     def delStudyLevels(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -1153,5 +1153,5 @@
     def delCourseTicket(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -1353,5 +1353,5 @@
     def delPaymentTicket(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -1406,5 +1406,5 @@
         if 'maintenance' in p_category:
             current_session = str(student['studycourse'].current_session)
-            if not student['accommodation'].has_key(current_session):
+            if not current_session in student['accommodation']:
                 self.flash(_('You have not yet booked accommodation.'))
                 self.redirect(self.url(self.context))
@@ -1559,5 +1559,5 @@
             return
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
@@ -2216,5 +2216,5 @@
     def _delCourseTicket(self, **data):
         form = self.request.form
-        if form.has_key('val_id'):
+        if 'val_id' in form:
             child_id = form['val_id']
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py	(revision 9700)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py	(revision 9701)
@@ -97,5 +97,5 @@
         items_changed = ''
 
-        if row.has_key('local_roles') and row['local_roles'] not in (
+        if 'local_roles' in row and row['local_roles'] not in (
             None, IGNORE_MARKER):
             role_manager = IPrincipalRoleManager(obj)
@@ -133,5 +133,5 @@
         errs, inv_errs, conv_dict =  super(
             FacultyProcessor, self).checkConversion(row, mode=mode)
-        if row.has_key('local_roles'):
+        if 'local_roles' in row:
             if row['local_roles'] in (None, DELETION_MARKER, IGNORE_MARKER):
                 return errs, inv_errs, conv_dict
