上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 72 下一页
摘要: 先来看一段代码: class First(object): def __init__(self): print ("first")class Second(object): def __init__(self): ... 阅读全文
posted @ 2017-06-23 18:04 2021年的顺遂平安君 阅读(99) 评论(0) 推荐(0)
摘要: 先来看一段代码: 这段代码的输出结果是: 也就是说,在 中的 override了父类(classes: First, Second, Third, Forth)的 。 输出结果是: 也就是说, 先继承了父类 _First_ 的 ,然后执行自己重新定义的 。 如果在所有父类中也使用 ,事情变得有趣: 阅读全文
posted @ 2017-06-23 18:04 2021年的顺遂平安君 阅读(557) 评论(0) 推荐(0)
摘要: An Easy Introduction to CUDA C and C++ This post is the first in a series on CUDA C and C++, which is the C/C++ interface to the CUDA parallel computi 阅读全文
posted @ 2017-06-23 10:55 2021年的顺遂平安君 阅读(297) 评论(0) 推荐(0)
摘要: An Easy Introduction to CUDA C and C++ This post is the first in a series on CUDA C and C++, which is the C/C++ interface to th... 阅读全文
posted @ 2017-06-23 10:55 2021年的顺遂平安君 阅读(63) 评论(0) 推荐(0)
摘要: class Inventory: def __init__(self): self.slots = [] def add_item(self, item): self.slots.append(item)class ... 阅读全文
posted @ 2017-06-22 22:12 2021年的顺遂平安君 阅读(68) 评论(0) 推荐(0)
摘要: ``` class Inventory: def __init__(self): self.slots = [] def add_item(self, item): self.slots.append(item) class SortedInventory(Inventory): def add_item(self, item): ... 阅读全文
posted @ 2017-06-22 22:12 2021年的顺遂平安君 阅读(205) 评论(0) 推荐(0)
摘要: This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may name an existing attribute or a new 阅读全文
posted @ 2017-06-22 20:10 2021年的顺遂平安君 阅读(234) 评论(0) 推荐(0)
摘要: This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may name an exist... 阅读全文
posted @ 2017-06-22 20:10 2021年的顺遂平安君 阅读(51) 评论(0) 推荐(0)
摘要: def test_var_args(f_arg, *argv): print("first normal arg:", f_arg) for arg in argv: print("another arg through *arg... 阅读全文
posted @ 2017-06-22 20:08 2021年的顺遂平安君 阅读(54) 评论(0) 推荐(0)
摘要: ``` def test_var_args(f_arg, *argv): print("first normal arg:", f_arg) for arg in argv: print("another arg through *argv:", arg) test_var_args('yasoob', 'python', 'eggs', 'test') ``` ... 阅读全文
posted @ 2017-06-22 20:08 2021年的顺遂平安君 阅读(140) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 72 下一页