6e23720ba23b04e2cf8ae76dea5043ab25cbdc1d,brian2/core/variables.py,VariableView,__setitem__,#VariableView#Any#Any#,307
Before Change
// with this situation
if isinstance(value, basestring) and isinstance(item, basestring):
check_units = self.unit is not None
template = self.group.templates.get("set_with_code_conditional",
"group_variable_set_conditional")
template = "group_variable_set_conditional"
self.group._set_with_code_conditional(variable, item, value,
template=template,
check_units=check_units,
After Change
try:
value = float(value)
except (TypeError, ValueError):
raise TypeError("When setting a variable based on a string ",
"index, the value has to be a string or a "
"scalar.")
check_units = self.unit is not None
template = "group_variable_set_conditional"
self.group._set_with_code_conditional(variable, item, repr(value),
template=template,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: brian-team/brian2
Commit Name: 6e23720ba23b04e2cf8ae76dea5043ab25cbdc1d
Time: 2013-10-08
Author: marcel.stimberg@ens.fr
File Name: brian2/core/variables.py
Class Name: VariableView
Method Name: __setitem__
Project Name: hellohaptik/chatbot_ner
Commit Name: 01af891949c7f99c70ed60731588b669881997e9
Time: 2020-01-27
Author: jain.chirag925@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_text
Project Name: prody/ProDy
Commit Name: c5b11b7668df61c3a5c3f927625430c56413d5fb
Time: 2012-11-14
Author: lordnapi@gmail.com
File Name: lib/prody/utilities/pathtools.py
Class Name:
Method Name: openFile