class_docstr: An "ambiguous" datetime object. This object acts like a
  ``datetime.datetime`` object but can have any of its attributes set to
  None, meaning unspecified.
docstr: Returns a copy of this object with the attributes given as keyword
  arguments replaced.
  
  >>> adt = adatetime(year=2009, month=10, day=31)
  >>> adt.replace(year=2010)
  (2010, 10, 31, None, None, None, None)
docstr_tok: ["Returns","a","copy","of","this","object","with","the","attributes","given","as","keyword","arguments","replaced",".",">",">",">","adt","=","adatetime","(","year=2009",",","month=10",",","day=31",")",">",">",">","adt.replace","(","year=2010",")","(","2010",",","10",",","31",",","None",",","None",",","None",",","None",")"]
code: def replace(self, **kwargs):
      """Returns a copy of this object with the attributes given as keyword
      arguments replaced.
  
      >>> adt = adatetime(year=2009, month=10, day=31)
      >>> adt.replace(year=2010)
      (2010, 10, 31, None, None, None, None)
      """
  
      newadatetime = self.copy()
      for key, value in iteritems(kwargs):
          if key in self.units:
              setattr(newadatetime, key, value)
          else:
              raise KeyError("Unknown argument %r" % key)
      return newadatetime
  
imports: import calendar
  import copy
  from datetime import date, datetime, timedelta
  from whoosh.compat import iteritems
label_desc: Use image node_id 7 for calling the adatetime obj's underlying member method code with example usage: obj.replace() and returns: newadatetime