build.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:CodeReader 作者: jasonrbr 项目源码 文件源码
def MakeDefaultArgRepr(defArgVal):
  try:
    inOut = defArgVal[1]
  except IndexError:
    # something strange - assume is in param.
    inOut = pythoncom.PARAMFLAG_FIN

  if inOut & pythoncom.PARAMFLAG_FHASDEFAULT:
    # times need special handling...
    val = defArgVal[2]
    if isinstance(val, datetime.datetime):
      # VARIANT <-> SYSTEMTIME conversions always lose any sub-second
      # resolution, so just use a 'timetuple' here.
      return repr(tuple(val.utctimetuple()))
    if type(val) is TimeType:
      # must be the 'old' pywintypes time object...
      year=val.year; month=val.month; day=val.day; hour=val.hour; minute=val.minute; second=val.second; msec=val.msec
      return "pywintypes.Time((%(year)d, %(month)d, %(day)d, %(hour)d, %(minute)d, %(second)d,0,0,0,%(msec)d))" % locals()
    return repr(val)
  return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号