Reputation: 11098
How would you unset a protocol buffer variable.
Given this .proto
:
message Product {
optional float price = 5;
}
If one tries deleting the item:
del product.price
this results:
AttributeError: can't delete attribute
If one tries setting the variable to None
:
product.price = None
this results:
TypeError: Cannot set mypackage.Product.price_was to None: None has type <class 'NoneType'>, but expected one of: numbers.Real
Upvotes: 2
Views: 1852