本文整理汇总了Python中dart_utilities.DartUtilities.strip_suffix方法的典型用法代码示例。如果您正苦于以下问题:Python DartUtilities.strip_suffix方法的具体用法?Python DartUtilities.strip_suffix怎么用?Python DartUtilities.strip_suffix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dart_utilities.DartUtilities
的用法示例。
在下文中一共展示了DartUtilities.strip_suffix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setter_callback_name
# 需要导入模块: from dart_utilities import DartUtilities [as 别名]
# 或者: from dart_utilities.DartUtilities import strip_suffix [as 别名]
return '%s(%s)' % (setter_name, ', '.join(arguments))
################################################################################
# Attribute configuration
################################################################################
# [Replaceable]
def setter_callback_name(interface, attribute):
cpp_class_name = DartUtilities.cpp_name(interface)
extended_attributes = attribute.extended_attributes
if (('Replaceable' in extended_attributes and
'PutForwards' not in extended_attributes) or
v8_attributes.is_constructor_attribute(attribute)):
# FIXME: rename to ForceSetAttributeOnThisCallback, since also used for Constructors
return '{0}V8Internal::{0}ReplaceableAttributeSetterCallback'.format(cpp_class_name)
# FIXME:disabling PutForwards for now since we didn't support it before
# if attribute.is_read_only and 'PutForwards' not in extended_attributes:
if attribute.is_read_only:
return '0'
return '%sV8Internal::%sAttributeSetterCallback' % (cpp_class_name, attribute.name)
################################################################################
# Constructors
################################################################################
idl_types.IdlType.constructor_type_name = property(
# FIXME: replace this with a [ConstructorAttribute] extended attribute
lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor'))