• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python funcions.get_rec_attr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中switching.helpers.funcions.get_rec_attr函数的典型用法代码示例。如果您正苦于以下问题:Python get_rec_attr函数的具体用法?Python get_rec_attr怎么用?Python get_rec_attr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_rec_attr函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: sollicitud

 def sollicitud(self):
     """Retorna l'objecte Sollicitud"""
     tree = 'PasoMRAMLConCambiosRestoTarifa.DatosSolicitud'
     sol = get_rec_attr(self.obj, tree, False)
     if sol:
         return C1.Sollicitud(sol)
     else:
         return False
开发者ID:gisce,项目名称:switching,代码行数:8,代码来源:A3.py


示例2: client

 def client(self):
     """Retorna l'objecte Client"""
     tree = 'PasoMRAMLConCambiosRestoTarifa.Cliente'
     cli = get_rec_attr(self.obj, tree, False)
     if cli:
         return C1.Client(cli)
     else:
         return False
开发者ID:gisce,项目名称:switching,代码行数:8,代码来源:A3.py


示例3: contracte

 def contracte(self):
     """Retorna l'objecte Contracte"""
     tree = '{0}.Contrato'.format(self.header)
     cont = get_rec_attr(self.obj, tree, False)
     if cont:
         return C1.Contracte(cont)
     else:
         return False
开发者ID:gisce,项目名称:switching,代码行数:8,代码来源:C2.py


示例4: gir_comptador

 def gir_comptador(self):
     num_ruedas = int(get_rec_attr(
         self.factura,
         'Medidas.Aparato.Integrador.NumeroRuedasEnteras.text',
         0
     ))
     if num_ruedas > 0:
         num_ruedas = 10 ** num_ruedas
     return num_ruedas
开发者ID:kailIII,项目名称:switching,代码行数:9,代码来源:F1.py


示例5: contracted_powers

 def contracted_powers(self):
     """Returns the contracted powers"""
     try:
         termino_potencia = get_rec_attr(
             self.factura.Potencia, 'TerminoPotencia'
         )
         return [
             int(aux.PotenciaContratada) for aux in termino_potencia.Periodo
         ]
     except AttributeError:
         return []
开发者ID:gisce,项目名称:switching,代码行数:11,代码来源:F1.py


示例6: _get_comptadors

 def _get_comptadors(self, obj=None):
     """Retorna totes les lectures en una llista de comptadors"""
     if obj is None:
         obj = self.obj
     comptadors = []
     for mesura in get_rec_attr(obj, 'Medidas', []):
         if mesura.CodUnificadoPuntoSuministro.text[:20] == \
                                                 self.get_codi[:20]:
             for aparell in mesura.Aparato:
                 compt = Comptador(aparell)
                 di, df = compt.dates_inici_i_final
                 comptadors.append((di, df, compt))
     return [a[2] for a in sorted(comptadors, lambda x,y: cmp(x[0], y[0]))]
开发者ID:kailIII,项目名称:switching,代码行数:13,代码来源:Q1.py


示例7: has_quantity

 def has_quantity(self):
     # If the quantity is 0 we will assume it's incorrect
     return bool(get_rec_attr(self.concepte, 'UnidadesConcepto.text', 0))
开发者ID:gisce,项目名称:switching,代码行数:3,代码来源:F1.py


示例8: codi

 def codi(self):
     return get_rec_attr(self.concepte_iva, 'Concepto.text')
开发者ID:kailIII,项目名称:switching,代码行数:2,代码来源:F1.py


示例9: has_price

 def has_price(self):
     # If the price is 0 we will assume it's incorrect
     return bool(
         get_rec_attr(self.concepte, 'ImporteUnidadConcepto.text', 0)
     )
开发者ID:gisce,项目名称:switching,代码行数:5,代码来源:F1.py


示例10: base

 def base(self):
     return float(
         get_rec_attr(self.iva, 'BaseImponible.text', 0)
     )
开发者ID:gisce,项目名称:switching,代码行数:4,代码来源:F1.py


示例11: percentage

 def percentage(self):
     return float(
         get_rec_attr(self.iva, 'Porcentaje.text', 0)
     )
开发者ID:gisce,项目名称:switching,代码行数:4,代码来源:F1.py


示例12: te_ajust

 def te_ajust(self):
     res = get_rec_attr(self.lectura, 'Ajuste', default={})
     return len(res) > 0
开发者ID:gisce,项目名称:switching,代码行数:3,代码来源:Q1.py


示例13: importe

 def importe(self):
     return float(
         get_rec_attr(self.iva, 'Importe.text', 0)
     )
开发者ID:gisce,项目名称:switching,代码行数:4,代码来源:F1.py



注:本文中的switching.helpers.funcions.get_rec_attr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python sword2.Connection类代码示例发布时间:2022-05-27
下一篇:
Python swisseph.calc_ut函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap