使__init__在python中创建其他类

时间:2018-12-03 11:47:39

标签: python python-3.x class

我创建了自己的类<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <div id="myid" class="myclass"> <span class="AvGbtn" style="background-image: url(/uploads/articles/768eec43.jpg); background-size: 100% 100%;" rel="nofollow"></span> <span class="AvGbtn" style="background-image: url(/uploads/articles/a79e6b78.jpg); background-size: 100% 100%;" rel="nofollow"></span> <span class="AvGbtn" style="background-image: url(/uploads/articles/27570903.jpg); background-size: 100% 100%;" rel="nofollow"></span> </div>,该类由两个变量my_classa初始化。

如果有人试图用b创建一个my_class对象,我希望该对象只是a==b而不是type(a)

如何实现?以下实现需要如何修改?

my_class

0 个答案:

没有答案