diff --git a/batavia/types/StrUtils.js b/batavia/types/StrUtils.js index c613ddb8f..0a6bc6aed 100644 --- a/batavia/types/StrUtils.js +++ b/batavia/types/StrUtils.js @@ -1,4 +1,5 @@ var exceptions = require('../core').exceptions +var constants = require('../core').constants var type_name = require('../core').type_name var BigNumber = require('bignumber.js').BigNumber @@ -1182,7 +1183,15 @@ function _new_subsitute(str, args, kwargs) { // sign // alternate form if (this.grouping === ',') { - throw new exceptions.ValueError.$pyclass("Cannot specify ',' with 's'.") + switch (constants.BATAVIA_MAGIC) { + case constants.BATAVIA_MAGIC_34: + case constants.BATAVIA_MAGIC_35a0: + case constants.BATAVIA_MAGIC_35: + case constants.BATAVIA_MAGIC_353: + throw new exceptions.ValueError.$pyclass("Cannot specify ',' with 's'.") + case constants.BATAVIA_MAGIC_36: + throw new exceptions.ValueError.$pyclass("Cannot specify ',' or '_' with 's'.") + } } if (this.sign) {