We use this method to assign a long-form breed name to each enumeration value, which is what the Value.toString method returned in the output above.
我们使用这个方法来给每一个枚举值赋一个长的品种名称,也就是上面输出中的Value . toString方法所返回的值。
Inside the _setstate_ method we are able to recreate the file object based on the name and position information we pickled, and assign the file object to the instance's logfile attribute.
在_ setstate _方法内,可以根据经过pickle的名称和位置信息来重建文件对象,并将该文件对象分配给这个实例的logfile属性。
应用推荐