Pythonとか
4686 ワード
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/10/18 16:14
# @Author : Ropon
# @File : 22_01.py
#1、
#2、
# def func(arg):
# pass
# func(1)
# func(2)
# ?
#
# :
#
# def email(em, text):
# """
#
# """
# print(em, text)
#
# def msg(tel, text):
# """
#
# """
# print(tel, text)
#
# def webchat(num, text):
# """
#
# """
# print(num, text)
#
# if 1 == 1:
# email('[email protected]', ' ')
# msg('13xxxxxx', ' ')
# webchat('ropon', ' ')
#
# class Message:
# def email(self, em, text):
# """
#
# """
# print(em, text)
#
# def msg(self, tel, text):
# """
#
# """
# print(tel, text)
#
# def webchat(self, num, text):
# """
#
# """
# print(num, text)
#
# if 2 == 2:
# obj = Message()
# obj.email('[email protected]', ' ')
# obj.msg('13xxxxxx', ' ')
# obj.webchat('ropon', ' ')
# :
# : 、
# : 、 : ,
# :
#
# Python
#
# :
# class :
# def (self):
# pass
#
# x1 = ()
# x1. ()
#
# class Foo:
# def __init__ (self, name): # ,
# self.name = name
# self.age = 18
# obj = Foo(' ')
# print(obj.name)
# , , ,
# ,
# def func1(arg):
# print(arg.name)
# print(arg.os)
# print(arg.cpus)
#
# class Ebs:
# def __init__(self, name, os ,cpus):
# self.name = name
# self.os = os
# self.cpus = cpus
#
# obj = Ebs('ebs-1', 'centos7.5', '4')
# func1(obj)
# 1
# 2
# 3
# 4
# :
# class UserInfo:
#
# def __init__(self):
# self.name = None
#
# def info(self):
# print(' {0}'.format(self.name))
#
# def account(self):
# print(' {0} ...'.format(self.name))
#
# def shopping(self):
# print(' {0} ...'.format(self.name))
#
# def login(self):
# name = input(' :')
# passwd = input(' :')
# if name == 'ropon' and passwd == '123':
# self.name = name
# while 1:
# lst = [' ', ' ', ' ', ' ']
# for num, index in enumerate(lst, 1):
# print(num, index)
# num = int(input(' :'))
# if num == 1:
# self.info()
# elif num == 2:
# self.account()
# elif num == 3:
# self.shopping()
# elif num == 4:
# exit()
# else:
# print(' , ')
# else:
# print(' ')
#
# obj = UserInfo()
# obj.login()
# class Demo:
# def __init__(self, name):
# self.name = name
#
# def msg(self,text):
# print(self.name, text)
#
# obj = Demo('ropon')
# obj.msg(' ')
# : 、 、
#
#
#
#
#
# class ( ):
# pass
# , ,
#
# ( / )
# class Vhost:
# def func1(self):
# print('func1')
#
# class OpVhost(Vhost):
# def func2(self):
# print('func2')
#
# class LsVhost(OpVhost):
# def func3(self):
# print('func3')
#
# def func1(self):
# print('LsVhost.func1')
#
# class Tvhost(LsVhost, OpVhost, Vhost):
# def func4(self):
# print('func4')
#
# obj = Tvhost()
# obj.func3()
# obj.func2()
# obj.func1()
# obj.func4()
#
# , ( )
# class Site:
# def list(self):
# print('site.list')
#
# class Ftp:
# def list(self):
# print('ftp.list')
#
# class Db:
# def list(self):
# print('db.list')
#
# def func1(arg):
# arg.list()
#
# obj = Site()
# # obj = Ftp()
# # obj = Db()
# func1(obj)