class test(object):

"""

get被称之为test对象的方法

"""

def __init__(self,var1):
self.var1 = var1

def get(self,a=None):
return self.var1

pass

def get(a):
return a

随机推荐

  1. Android || IOS录制mp3语音文件方法

    Android Android Supported Media Formats : http://developer.android.com/guide/appendix/media-formats. ...

  2. Redis - Keepalived + redis 主备热备切换

    1. 热备方案 硬件:server两台,分别用于master-redis及slave-redis 软件:redis.keepalived 实现目标: 由keepalived对外提供虚拟IP(VIP)进 ...

  3. [转]Table-Driven and Data Driven Programming

    What is Table-Driven and Data-Driven Programming? Data/Table-Driven programming is the technique of ...

  4. ci总结

    1.创建模型,在模型中加载$this->load->database();2.在模型中写入想实现的功能方法3.在控制器中加载辅助函数和模型,$this->load->model ...

  5. test Windows Live Writer

    1, 下载Live Writer http://windows.microsoft.com/zh-cn/windows-live/essentials-other#essentials=overvie ...

  6. 利用range() 控制循环

    s = ['a','b','c','d','e'] for i in range(len(s)):...     if i < len(s)-1:...         print s[i] a ...

  7. 使用BitTorrent-Sync实现双机文件双向同步

    BitTorrent-Sync是一款基于P2P的分布式文件同步工具,简称btsync,非开源软件但免费使用.本文使用btsync实现两台服务器上的软件双向同步. 安装 直接从官网下载相应的安装包,为了 ...

  8. C++ STL库之vector

    vector直译有"容器"之意,我们可以把它理解成是一个不限长度的数组. 我们可以通过代码进一步理解vector. 示例代码如下: #include <stdio.h> ...

  9. poj 3159 dijkstra 最短路

    Description During the kindergarten days, flymouse was the monitor of his class. Occasionally the he ...

  10. zboot/xtract.c

    /* *  linux/zBoot/xtract.c * *  Copyright (C) 1993  Hannu Savolainen * *    Extracts the system imag ...