*** rlextra/ers/docgendb.py	Tue Feb 27 13:11:02 2007
--- rlextra/ers/docgendb.py	Thu Sep 25 15:28:02 2008
***************
*** 81,87 ****
          ForeignKey('hitLogEntryId', 'HitLogEntry', 'id'),
          ]
  
-     @classmethod
      def dropHitLogs(cls, conn, maxDaysToKeep=100):
          # drop all HitLogEntry rows that have no corresponding DocumentLogEntry
          # row, observing maxDaysToKeep
--- 81,86 ----
***************
*** 105,111 ****
          nrDeleted = nrTotal-nrRemaining
  
          return nrDeleted, nrRemaining
! 
  
  class Calendar(Table):
  
--- 104,110 ----
          nrDeleted = nrTotal-nrRemaining
  
          return nrDeleted, nrRemaining
!     dropHitLogs=classmethod(dropHitLogs)
  
  class Calendar(Table):
  
***************
*** 121,127 ****
          IntColumn('dayOfWeek'),
          ]
  
-     @classmethod
      def ensureExistsAndPopulated(cls, conn, minYear=1990, maxYear=2020):
          cls.createTable(conn, dropIfExists=True)
          day = DateTime.DateTimeDelta(1)
--- 120,125 ----
***************
*** 144,149 ****
--- 142,148 ----
              cal.store()
              date += day
          conn.commit()
+     ensureExistsAndPopulated=classmethod(ensureExistsAndPopulated)
  
  
  def yes(msg, limit=10, addPrompt=' (yes/[no]): '):
*** rlextra/ers/metadata.py	Thu Aug  7 13:19:59 2008
--- rlextra/ers/metadata.py	Thu Sep 25 15:30:00 2008
***************
*** 1326,1332 ****
                  pass
          return resid
  
-     @staticmethod
      def _newPrefix(prefix,name,dot='.'):
          if not prefix:
              prefix = name+dot
--- 1326,1331 ----
***************
*** 1335,1340 ****
--- 1334,1340 ----
          else:
              prefix += '.'+name+dot
          return prefix
+     _newPrefix=staticmethod(_newPrefix)
  
      def iteritems(self,prefix=''):
          """return name,object pairs
*** rlextra/ers/webapp.py	Tue Aug 26 11:23:36 2008
--- rlextra/ers/webapp.py	Thu Sep 25 15:31:23 2008
***************
*** 184,195 ****
  from maketoken import _getRotor, _makeToken, _checkToken
  
  class _SslChecker:
-     @staticmethod
      def isSSL():
          """ Return true if we are on a SSL (https) connection. """
          return (bool(os.environ.get('SSL_PROTOCOL',''))
                  or os.environ.get('HTTPS','').lower() in ('yes','on','1','true')
                  or os.environ.get('SERVER_PORT','')=='443')
  
  class WebRequest(_SslChecker):
      def __init__(self, **kw):
--- 184,195 ----
  from maketoken import _getRotor, _makeToken, _checkToken
  
  class _SslChecker:
      def isSSL():
          """ Return true if we are on a SSL (https) connection. """
          return (bool(os.environ.get('SSL_PROTOCOL',''))
                  or os.environ.get('HTTPS','').lower() in ('yes','on','1','true')
                  or os.environ.get('SERVER_PORT','')=='443')
+     isSSL=staticmethod(isSSL)
  
  class WebRequest(_SslChecker):
      def __init__(self, **kw):
***************
*** 753,759 ****
              write(resp.getOutput())
          logger.store()
  
-     @classmethod
      def handleFCGI(cls,**kwd):
          from rlextra.thirdparty import fcgi
          from reportlab.rl_config import _reset
--- 753,758 ----
***************
*** 771,776 ****
--- 770,776 ----
              if lim is not None and count>lim: break
              _reset()
              os.chdir(cwd)
+     handleFCGI=classmethod(hanldeFCGI)
  
      def _handleDict(self, D, url='dict'):
          "handle a request constructed from dictionary D"
***************
*** 1382,1388 ****
              )
          response.setHeader('Location', url)
  
-     @staticmethod
      def _makeHiddenFields(params,unwanted=[
                                      'action', 'CGI_SCRIPT','SCRIPT_NAME',
                                      'formName', 'submit', 'reset', 'blur',
--- 1382,1387 ----
***************
*** 1397,1404 ****
              else:
                      L('''<input type="hidden" name="%s" value="%s"/>''' % (key,htmlEscape(value)))
          return htmltext(sep.join(L.__self__))
  
-     @staticmethod
      def _versionText():
          try:
              f=open('version.txt')
--- 1396,1403 ----
              else:
                      L('''<input type="hidden" name="%s" value="%s"/>''' % (key,htmlEscape(value)))
          return htmltext(sep.join(L.__self__))
+     _makeHiddenFields=staticmethod(_makeHiddenFields)
  
      def _versionText():
          try:
              f=open('version.txt')
***************
*** 1408,1413 ****
--- 1407,1413 ----
                  f.close()
          except:
              return 'cannot read version.txt'
+     _versionText=staticmethod(_versionText)
  
  class DeferredJobsMixin:
      _deferredArgPfx = '--deferredcgiparams='
*** rlextra/forms/qbase.py	Wed Apr 23 16:58:06 2008
--- rlextra/forms/qbase.py	Thu Sep 25 15:34:09 2008
***************
*** 174,182 ****
                  if isinstance(child, QBase):
                      child.makeSample()
  
-     @property
      def textValue(self):
          return self.getTextValue()
  
      def populateDict(self, dict, asText):
          "Do not modify dict in base class"
--- 174,182 ----
                  if isinstance(child, QBase):
                      child.makeSample()
  
      def textValue(self):
          return self.getTextValue()
+     textValue=property(textValue)
  
      def populateDict(self, dict, asText):
          "Do not modify dict in base class"
***************
*** 931,943 ****
          #called AFTER options have been set
          self._initialized = 1
  
-     @property
      def values(self):
          return [obj.value for obj in self.options]
  
-     @property
      def labels(self):
          return [obj.label for obj in self.options]
  
      def removeOption(self, value):
          """To be called at fixup() time."""
--- 931,943 ----
          #called AFTER options have been set
          self._initialized = 1
  
      def values(self):
          return [obj.value for obj in self.options]
+     values=property(values)
  
      def labels(self):
          return [obj.label for obj in self.options]
+     labels=staticmethod(labels)
  
      def removeOption(self, value):
          """To be called at fixup() time."""
***************
*** 1347,1353 ****
  
  class QTd(QContainer):
      _htmlAttrs = 'htmlClass','htmlStyle','colspan','rowspan'
-     @property
      def htmlAttrs(self):
          astr = []
          for x in self._htmlAttrs:
--- 1347,1352 ----
***************
*** 1355,1360 ****
--- 1354,1360 ----
              if v is None: continue
              astr.append(' %s=%r' % (x.lower().lstrip('html',1),v))
          return ''.join(astr)
+     htmlAttrs=property(htmlAttrs)
  
      def makeHtml(self):
          html = []
*** rlextra/graphics/guiedit/mutils.py	Mon Jul 16 15:00:17 2007
--- rlextra/graphics/guiedit/mutils.py	Thu Sep 25 15:28:02 2008
***************
*** 480,486 ****
  		self.deletions = []
  		self.assigns = []
  		a = self.assigns.append
! 		for i in (i for i,x in enumerate(T) if x[1].endswith('=') and (i<2 or T[i-2][1] not in (',','('))):
  			lhs = []
  			for j in xrange(s,i):
  				t = T[j][1]
--- 480,486 ----
  		self.deletions = []
  		self.assigns = []
  		a = self.assigns.append
! 		for i in [i for i,x in enumerate(T) if x[1].endswith('=') and (i<2 or T[i-2][1] not in (',','('))]:
  			lhs = []
  			for j in xrange(s,i):
  				t = T[j][1]
***************
*** 509,522 ****
  	def LHS(self):
  		L = getattr(self,'_LHS',None)
  		if L==None:
! 			L = self._LHS = list(a[0] for a in self.assigns)
  		return L
  	LHS = property(LHS)
  
- 	@staticmethod
  	def tokens(s):
  		import tokenize, StringIO
  		return list(tokenize.generate_tokens(StringIO.StringIO(s).readline))
  
  class AssignChecker:
  	def __init__(self,lines):
--- 509,522 ----
  	def LHS(self):
  		L = getattr(self,'_LHS',None)
  		if L==None:
! 			L = self._LHS = [a[0] for a in self.assigns]
  		return L
  	LHS = property(LHS)
  
  	def tokens(s):
  		import tokenize, StringIO
  		return list(tokenize.generate_tokens(StringIO.StringIO(s).readline))
+ 	tokens=staticmethod(tokens)
  
  class AssignChecker:
  	def __init__(self,lines):
*** rlextra/radxml/xmlutils.py	Thu Sep 27 10:57:21 2007
--- rlextra/radxml/xmlutils.py	Thu Sep 25 15:28:02 2008
***************
*** 517,535 ****
              t = type(t) is TupleType and (n,self._attrs,c,o) or [n,self._attrs,c,o]
              p[0][p[1]] = t
  
-     @staticmethod
      def xmlEscape(a):
          if _XMLESCAPE: a = xmlEscape(a)
          return a
  
      def toTupleTree(self):
          return (self.tagName, self._attrs, self._children or None, self._spare)
  
  class NonEscapingTagWrapper(TagWrapper):
-     @staticmethod
      def xmlEscape(a):
          if isinstance(a,str): return quotedStr(a)
          return quotedUnicode(a)
  
  class SilentTagWrapper(TagWrapper):
      """Does not complain when nonexistent leaf attributes accessed.
--- 517,535 ----
              t = type(t) is TupleType and (n,self._attrs,c,o) or [n,self._attrs,c,o]
              p[0][p[1]] = t
  
      def xmlEscape(a):
          if _XMLESCAPE: a = xmlEscape(a)
          return a
+     xmlEscape=staticmethod(xmlEscape)
  
      def toTupleTree(self):
          return (self.tagName, self._attrs, self._children or None, self._spare)
  
  class NonEscapingTagWrapper(TagWrapper):
      def xmlEscape(a):
          if isinstance(a,str): return quotedStr(a)
          return quotedUnicode(a)
+     xmlEscape=staticmethod(xmlEscape)
  
  class SilentTagWrapper(TagWrapper):
      """Does not complain when nonexistent leaf attributes accessed.
*** rlextra/thirdparty/geopy/distance.py	Wed Jul  9 09:55:33 2008
--- rlextra/thirdparty/geopy/distance.py	Thu Sep 25 15:28:02 2008
***************
*** 83,124 ****
          kilometers += km(miles=miles, feet=feet, nautical=nautical)
          self._kilometers = kilometers
  
-     @property
      def kilometers(self):
          return self._kilometers
      
-     @property
      def miles(self):
          return miles(self.kilometers)
  
-     @property
      def feet(self):
          return feet(self.miles)
  
-     @property
      def nautical(self):
          return nautical(self.kilometers)
  
      # Sadly, just aliasing the above properties with their abbreviations does
      # not work when they are subclassed. The easiest way I could find to
      # make this work without using a metaclass was to write more full-fledged
      # definitions...
  
-     @property
      def mi(self):
          return self.miles
      
-     @property
      def km(self):
          return self.kilometers
      
-     @property
      def ft(self):
          return self.feet
  
-     @property
      def nm(self):
          return self.nautical
  
      def __add__(self, other):
          """Return a new Distance of length ``self`` + ``other``."""
--- 83,124 ----
          kilometers += km(miles=miles, feet=feet, nautical=nautical)
          self._kilometers = kilometers
  
      def kilometers(self):
          return self._kilometers
+     kilometers=property(kilometers)
      
      def miles(self):
          return miles(self.kilometers)
+     miles=property(miles)
  
      def feet(self):
          return feet(self.miles)
+     feet=property(feet)
  
      def nautical(self):
          return nautical(self.kilometers)
+     nautical=property(nautical)
  
      # Sadly, just aliasing the above properties with their abbreviations does
      # not work when they are subclassed. The easiest way I could find to
      # make this work without using a metaclass was to write more full-fledged
      # definitions...
  
      def mi(self):
          return self.miles
+     mi=property(mi)
      
      def km(self):
          return self.kilometers
+     km=property(km)
      
      def ft(self):
          return self.feet
+     ft=property(ft)
  
      def nm(self):
          return self.nautical
+     nm=property(nm)
  
      def __add__(self, other):
          """Return a new Distance of length ``self`` + ``other``."""
***************
*** 188,196 ****
          """
          raise NotImplementedError
  
-     @property
      def kilometers(self):
          raise NotImplementedError
  
  class GreatCircleDistance(GeodesicDistance):
      """Use spherical geometry to calculate the surface distance between two
--- 188,196 ----
          """
          raise NotImplementedError
  
      def kilometers(self):
          raise NotImplementedError
+     kilometers=property(kilometers)
  
  class GreatCircleDistance(GeodesicDistance):
      """Use spherical geometry to calculate the surface distance between two
***************
*** 232,240 ****
          
          self.radians = d
      
-     @property
      def kilometers(self):
          return self.RADIUS * self.radians
      
  
  class VincentyDistance(GeodesicDistance):
--- 232,240 ----
          
          self.radians = d
      
      def kilometers(self):
          return self.RADIUS * self.radians
+     kilometers=property(kilometers)
      
  
  class VincentyDistance(GeodesicDistance):
***************
*** 341,353 ****
          self.initial_bearing = (360 + degrees(alpha_1)) % 360
          self.final_bearing = (360 + degrees(alpha_2)) % 360
  
-     @property
      def kilometers(self):
          return self._kilometers
  
-     @property
      def forward_azimuth(self):
          return self.initial_bearing
  
  
  # Set the default distance formula to the most generally accurate.
--- 341,353 ----
          self.initial_bearing = (360 + degrees(alpha_1)) % 360
          self.final_bearing = (360 + degrees(alpha_2)) % 360
  
      def kilometers(self):
          return self._kilometers
+     kilometers=property(kilometers)
  
      def forward_azimuth(self):
          return self.initial_bearing
+     forward_azimuth=property(forward_azimuth)
  
  
  # Set the default distance formula to the most generally accurate.
*** rlextra/thirdparty/geopy/geocoders.py	Fri Jul 11 18:01:33 2008
--- rlextra/thirdparty/geopy/geocoders.py	Thu Sep 25 15:28:02 2008
***************
*** 48,54 ****
      """A Geocoder subclass with utility methods helpful for handling results
      given by web-based geocoders."""
      
-     @classmethod
      def _get_encoding(cls, page, contents=None):
          """Get the last encoding (charset) listed in the header of ``page``."""
          plist = page.headers.getplist()
--- 48,53 ----
***************
*** 61,76 ****
                  return xml.dom.minidom.parseString(contents).encoding
              except ExpatError:
                  pass
  
-     @classmethod
      def _decode_page(cls, page):
          """Read the encoding (charset) of ``page`` and try to encode it using
          UTF-8."""
          contents = page.read()
          encoding = cls._get_encoding(page, contents) or sys.getdefaultencoding()
          return unicode(contents, encoding=encoding).encode('utf-8')
  
-     @classmethod
      def _get_first_text(cls, node, tag_names, strip=None):
          """Get the text value of the first child of ``node`` with tag
          ``tag_name``. The text is stripped using the value of ``strip``."""
--- 60,75 ----
                  return xml.dom.minidom.parseString(contents).encoding
              except ExpatError:
                  pass
+     _get_encoding=classmethod(_get_encoding)
  
      def _decode_page(cls, page):
          """Read the encoding (charset) of ``page`` and try to encode it using
          UTF-8."""
          contents = page.read()
          encoding = cls._get_encoding(page, contents) or sys.getdefaultencoding()
          return unicode(contents, encoding=encoding).encode('utf-8')
+     _decode_page=classmethod(_decode_page)
  
      def _get_first_text(cls, node, tag_names, strip=None):
          """Get the text value of the first child of ``node`` with tag
          ``tag_name``. The text is stripped using the value of ``strip``."""
***************
*** 82,93 ****
                  if nodes:
                      child = nodes[0].firstChild
                      return child and child.nodeValue.strip(strip)
  
-     @classmethod
      def _join_filter(cls, sep, seq, pred=bool):
          """Join items in ``seq`` with string ``sep`` if pred(item) is True.
          Sequence items are passed to unicode() before joining."""
          return sep.join([unicode(i) for i in seq if pred(i)])
  
  
  class MediaWiki(WebGeocoder):
--- 81,93 ----
                  if nodes:
                      child = nodes[0].firstChild
                      return child and child.nodeValue.strip(strip)
+     _get_first_text=classmethod(_get_first_text)
  
      def _join_filter(cls, sep, seq, pred=bool):
          """Join items in ``seq`` with string ``sep`` if pred(item) is True.
          Sequence items are passed to unicode() before joining."""
          return sep.join([unicode(i) for i in seq if pred(i)])
+     _join_filter=classmethod(_join_filter)
  
  
  class MediaWiki(WebGeocoder):
***************
*** 109,118 ****
          if callable(transform_string):
              self.transform_string = transform_string
  
-     @classmethod
      def transform_string(cls, string):
          """Do the WikiMedia dance: replace spaces with underscores."""
          return string.replace(' ', '_')
  
      def geocode(self, string):
          wiki_string = self.transform_string(string)
--- 109,118 ----
          if callable(transform_string):
              self.transform_string = transform_string
  
      def transform_string(cls, string):
          """Do the WikiMedia dance: replace spaces with underscores."""
          return string.replace(' ', '_')
+     transform_string=classmethod(transform_string)
  
      def geocode(self, string):
          wiki_string = self.transform_string(string)
***************
*** 310,320 ****
          self.format_string = format_string
          self.output_format = output_format
  
-     @property
      def url(self):
          domain = self.domain.strip('/')
          resource = self.resource.strip('/')
          return "http://%(domain)s/%(resource)s?%%s" % locals()
  
      def geocode(self, string, exactly_one=True):
          params = {'q': self.format_string % string,
--- 310,320 ----
          self.format_string = format_string
          self.output_format = output_format
  
      def url(self):
          domain = self.domain.strip('/')
          resource = self.resource.strip('/')
          return "http://%(domain)s/%(resource)s?%%s" % locals()
+     url=property(url)
  
      def geocode(self, string, exactly_one=True):
          params = {'q': self.format_string % string,
***************
*** 365,371 ****
          if exactly_one:
              return parse_place(places[0])
          else:
!             return (parse_place(place) for place in places)
  
      def parse_csv(self, page, exactly_one=True):
          raise NotImplementedError
--- 365,371 ----
          if exactly_one:
              return parse_place(places[0])
          else:
!             return tuple([parse_place(place) for place in places])
  
      def parse_csv(self, page, exactly_one=True):
          raise NotImplementedError
***************
*** 391,397 ****
          if exactly_one:
              return parse_place(places[0])
          else:
!             return (parse_place(place) for place in places)
  
      def parse_js(self, page, exactly_one=True):
          """This parses JavaScript returned by queries the actual Google Maps
--- 391,397 ----
          if exactly_one:
              return parse_place(places[0])
          else:
!             return tuple([parse_place(place) for place in places])
  
      def parse_js(self, page, exactly_one=True):
          """This parses JavaScript returned by queries the actual Google Maps
***************
*** 427,433 ****
              marker = markers[0]
              return parse_marker(marker)
          else:
!             return (parse_marker(marker) for marker in markers)
  
  
  class Yahoo(WebGeocoder):
--- 427,433 ----
              marker = markers[0]
              return parse_marker(marker)
          else:
!             return tuple([parse_marker(marker) for marker in markers])
  
  
  class Yahoo(WebGeocoder):
***************
*** 503,509 ****
          if exactly_one:
              return parse_result(results[0])
          else:
!             return (parse_result(result) for result in results)
  
  
  class GeocoderDotUS(WebGeocoder):
--- 503,509 ----
          if exactly_one:
              return parse_result(results[0])
          else:
!             return tuple([parse_result(result) for result in results])
  
  
  class GeocoderDotUS(WebGeocoder):
***************
*** 538,544 ****
          self.username = username
          self.__password = password
  
-     @property
      def url(self):
          domain = "geocoder.us"
          username = self.username
--- 538,543 ----
***************
*** 556,561 ****
--- 555,561 ----
              resource += "geocode?%s"
  
          return "http://%(auth)s%(domain)s/%(resource)s" % locals()
+     url=property(url)
  
      def geocode(self, string, exactly_one=True):
          dispatch = getattr(self, 'geocode_' + self.protocol)
***************
*** 586,592 ****
          if exactly_one:
              return parse_result(results[0])
          else:
!             return (parse_result(result) for result in results)
  
      def geocode_rest(self, string, exactly_one=True):
          params = {'address': self.format_string % string}
--- 586,592 ----
          if exactly_one:
              return parse_result(results[0])
          else:
!             return tuple([parse_result(result) for result in results])
  
      def geocode_rest(self, string, exactly_one=True):
          params = {'address': self.format_string % string}
***************
*** 619,625 ****
          if exactly_one:
              return parse_point(points[0])
          else:
!             return (parse_point(point) for point in points)
  
  
  class VirtualEarth(WebGeocoder):
--- 619,625 ----
          if exactly_one:
              return parse_point(points[0])
          else:
!             return tuple([parse_point(point) for point in points])
  
  
  class VirtualEarth(WebGeocoder):
***************
*** 638,648 ****
          self.domain = domain
          self.format_string = format_string
  
-     @property
      def url(self):
          domain = self.domain
          resource = "search.ashx"
          return "http://%(domain)s/%(resource)s?%%s" % locals()
  
      def geocode(self, string, exactly_one=True):
          params = {'b': self.format_string % string}
--- 638,648 ----
          self.domain = domain
          self.format_string = format_string
  
      def url(self):
          domain = self.domain
          resource = "search.ashx"
          return "http://%(domain)s/%(resource)s?%%s" % locals()
+     url=property(url)
  
      def geocode(self, string, exactly_one=True):
          params = {'b': self.format_string % string}
***************
*** 681,687 ****
          if exactly_one:
              return parse_match(matches[0])
          else:
!             return (parse_match(match) for match in matches)
  
  
  class GeoNames(WebGeocoder):
--- 681,687 ----
          if exactly_one:
              return parse_match(matches[0])
          else:
!             return tuple([parse_match(match) for match in matches])
  
  
  class GeoNames(WebGeocoder):
***************
*** 689,701 ****
          self.format_string = format_string
          self.output_format = output_format
  
-     @property
      def url(self):
          domain = "ws.geonames.org"
          output_format = self.output_format.lower()
          append_formats = {'json': 'JSON'}
          resource = "postalCodeSearch" + append_formats.get(output_format, '')
          return "http://%(domain)s/%(resource)s?%%s" % locals()
  
      def geocode(self, string, exactly_one=True):
          params = {'placename': string}
--- 689,701 ----
          self.format_string = format_string
          self.output_format = output_format
  
      def url(self):
          domain = "ws.geonames.org"
          output_format = self.output_format.lower()
          append_formats = {'json': 'JSON'}
          resource = "postalCodeSearch" + append_formats.get(output_format, '')
          return "http://%(domain)s/%(resource)s?%%s" % locals()
+     url=property(url)
  
      def geocode(self, string, exactly_one=True):
          params = {'placename': string}
***************
*** 731,737 ****
          if exactly_one:
              return parse_code(codes[0])
          else:
!             return (parse_code(code) for code in codes)
  
      def parse_xml(self, page, exactly_one):
          if not isinstance(page, basestring):
--- 731,737 ----
          if exactly_one:
              return parse_code(codes[0])
          else:
!             return tuple([parse_code(code) for code in codes])
  
      def parse_xml(self, page, exactly_one):
          if not isinstance(page, basestring):
***************
*** 758,765 ****
          if exactly_one:
              return parse_code(codes[0])
          else:
!             return (parse_code(code) for code in codes)
  
  
  __all__ = ['Geocoder', 'MediaWiki', 'SemanticMediaWiki', 'Google', 'Yahoo',
!            'GeocoderDotUS', 'VirtualEarth', 'GeoNames']

--- 758,765 ----
          if exactly_one:
              return parse_code(codes[0])
          else:
!             return tuple([parse_code(code) for code in codes])
  
  
  __all__ = ['Geocoder', 'MediaWiki', 'SemanticMediaWiki', 'Google', 'Yahoo',
!            'GeocoderDotUS', 'VirtualEarth', 'GeoNames']
*** rlextra/utils/namedtuple.py	Mon Oct 29 11:24:57 2007
--- rlextra/utils/namedtuple.py	Thu Sep 25 15:28:02 2008
***************
*** 28,34 ****
      def __new__(cls, *args, **kwds):
          if kwds:
              try:
!                 args += tuple(kwds[name] for name in field_names[len(args):])
              except KeyError, name:
                  raise TypeError('%s missing required argument: %s' % (typename, name))
          if len(args) != nargs:
--- 28,34 ----
      def __new__(cls, *args, **kwds):
          if kwds:
              try:
!                 args += tuple([kwds[name] for name in field_names[len(args):]])
              except KeyError, name:
                  raise TypeError('%s missing required argument: %s' % (typename, name))
          if len(args) != nargs:
***************
*** 38,44 ****
      def __from_iterable__(cls,arg):
          return cls.__new__(cls,*arg)
  
!     repr_template = '%s(%s)' % (typename, ', '.join('%s=%%r' % name for name in field_names))
  
      m = dict(vars(tuple))       # pre-lookup superclass methods (for faster lookup)
      m.update(__doc__= '%s(%s)' % (typename, ', '.join(field_names)),
--- 38,44 ----
      def __from_iterable__(cls,arg):
          return cls.__new__(cls,*arg)
  
!     repr_template = '%s(%s)' % (typename, ', '.join(['%s=%%r' % name for name in field_names]))
  
      m = dict(vars(tuple))       # pre-lookup superclass methods (for faster lookup)
      m.update(__doc__= '%s(%s)' % (typename, ', '.join(field_names)),
***************
*** 49,55 ****
               __field_names__ = tuple(field_names),
               __from_iterable__=classmethod(__from_iterable__),
               )
!     m.update((name, property(itemgetter(index))) for index, name in enumerate(field_names))
  
      return type(typename, (tuple,), m)
  
--- 49,55 ----
               __field_names__ = tuple(field_names),
               __from_iterable__=classmethod(__from_iterable__),
               )
!     m.update(tuple([(name, property(itemgetter(index))) for index, name in enumerate(field_names)]))
  
      return type(typename, (tuple,), m)
  
*** rlextra/utils/url2fscache.py	Fri Jan 19 12:33:33 2007
--- rlextra/utils/url2fscache.py	Thu Sep 25 15:28:02 2008
***************
*** 86,92 ****
      def __getitem__(self,url):
          return self._cache[url]
  
-     @staticmethod
      def writeText(text,path,msgFunc=None):
          dir = os.path.dirname(path)
          try:
--- 86,91 ----
***************
*** 97,102 ****
--- 96,102 ----
          f.write(text)
          f.close()
          if msgFunc: msgFunc(' '.join(('wrote',path,'length',str(len(text)))))
+     writeText=staticmethod(writeText)
  
      def setPath(self,url,path):
          v = self._cache[url]
*** rlextra/utils/zipapp.py	Mon May 12 17:06:47 2008
--- rlextra/utils/zipapp.py	Thu Sep 25 15:28:02 2008
***************
*** 744,750 ****
              os.symlink(src,tgt)
              self._log('symlink(%r,%r)' % (src,tgt))
  
-     @staticmethod
      def platformValue(**kwds):
          p = sys.platform
          try:
--- 744,749 ----
***************
*** 752,757 ****
--- 751,757 ----
              return kwds.get(p,default)
          except KeyError:
              return kwds[p]
+     platformValue=staticmethod(platformValue)
  
      def yesnoquery(self,prompt):
          yn = getattr(self,'_yesno',0)

--- rlextra/preppy/test/check_algorithms.py	Thu Jan 29 13:10:30 2009
+++ rlextra/preppy/test/check_algorithms.py	Thu Jan 29 13:07:08 2009
@@ -197,20 +197,20 @@
     def checkKwds(self):
         self.assertEquals(
             self.getRunTimeOutput(
-                "{{def(a,**kwds)}}Hello World{{a}}{{if kwds}}{{[k for k in sorted(kwds.items())]}}{{endif}}",1),
+                "{{def(a,**kwds)}}{{script}}def sorted(L): L.sort(); return L{{endscript}}Hello World{{a}}{{if kwds}}{{[k for k in sorted(kwds.items())]}}{{endif}}",1),
             "Hello World1")
         self.assertEquals(
             self.getRunTimeOutput(
-                "{{def(a,**kwds)}}Hello World{{a}}{{if kwds}}{{[k for k in sorted(kwds.items())]}}{{endif}}",1,b=2,c=3),
+                "{{def(a,**kwds)}}{{script}}def sorted(L): L.sort(); return L{{endscript}}Hello World{{a}}{{if kwds}}{{[k for k in sorted(kwds.items())]}}{{endif}}",1,b=2,c=3),
             "Hello World1[('b', 2), ('c', 3)]")
 
-    @staticmethod
     def bracket(x):
         return "[%s]" % x
+    bracket=staticmethod(bracket)
 
-    @staticmethod
     def brace(x):
         return "{%s}" % x
+    brace=staticmethod(brace)
 
     def checkLQuoting(self):
         '''__lquoteFunc__ applies to the literals'''
