运维知识库-BigHead
  • 首页
  • 电子书-知识库老版本
  • VIP视频免费看
  • 联系作者
  • 随笔
Python
Python

Python classmethod&staticmethod类方法使用案例

import settings class A(object): def __init__(self, ip, port): self.ip = ip self.port = port self.s = 0 self.id = self.create_uuid() def connect(self): self.s = 1 print('IP: %s PORT:%s' % (self.ip, self.port)) @staticmethod def create_uuid(): import uuid retur…

2020年08月19日 0条评论 841点热度 3人点赞 阅读全文
文章归档
  • 2022年7月
  • 2021年6月
  • 2021年4月
  • 2021年3月
  • 2021年2月
  • 2020年8月
  • 2020年7月
分类目录
  • ELK
  • Jenkins
  • K8S
  • Nginx
  • Openvpn
  • Python
  • 小技能
  • 未分类

COPYRIGHT © 2020 运维知识库-BigHead. ALL RIGHTS RESERVED.

蜀ICP备16012425号