当前位置: 首页>>代码示例>>Python>>正文


Python MultiPurposeList.__delitem__方法代码示例

本文整理汇总了Python中orgmode.liborgmode.base.MultiPurposeList.__delitem__方法的典型用法代码示例。如果您正苦于以下问题:Python MultiPurposeList.__delitem__方法的具体用法?Python MultiPurposeList.__delitem__怎么用?Python MultiPurposeList.__delitem__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在orgmode.liborgmode.base.MultiPurposeList的用法示例。


在下文中一共展示了MultiPurposeList.__delitem__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __delitem__

# 需要导入模块: from orgmode.liborgmode.base import MultiPurposeList [as 别名]
# 或者: from orgmode.liborgmode.base.MultiPurposeList import __delitem__ [as 别名]
	def __delitem__(self, i):
		item = self[i]
		if item.previous_sibling:
			item.previous_sibling._next_sibling = item.next_sibling
		if item.next_sibling:
			item.next_sibling._previous_sibling = item.previous_sibling

		self._add_to_deleted_headings(item)
		MultiPurposeList.__delitem__(self, i)
开发者ID:imxiaohui,项目名称:vimrc-1,代码行数:11,代码来源:headings.py

示例2: __delitem__

# 需要导入模块: from orgmode.liborgmode.base import MultiPurposeList [as 别名]
# 或者: from orgmode.liborgmode.base.MultiPurposeList import __delitem__ [as 别名]
	def __delitem__(self, i, taint=True):
		item = self[i]
		if item.previous_sibling:
			item.previous_sibling._next_sibling = item.next_sibling
		if item.next_sibling:
			item.next_sibling._previous_sibling = item.previous_sibling

		# if taint:
			# self._add_to_deleted_domobjs(item)
		MultiPurposeList.__delitem__(self, i)
开发者ID:Yixf-Self,项目名称:vim-orgmode,代码行数:12,代码来源:dom_obj.py

示例3: __delitem__

# 需要导入模块: from orgmode.liborgmode.base import MultiPurposeList [as 别名]
# 或者: from orgmode.liborgmode.base.MultiPurposeList import __delitem__ [as 别名]
	def __delitem__(self, i, taint=True):
		if isinstance(i, slice):
			items = self[i]
			if items:
				first = items[0]
				last = items[-1]
				if first.previous_sibling:
					first.previous_sibling._next_sibling = last.next_sibling
				if last.next_sibling:
					last.next_sibling._previous_sibling = first.previous_sibling
			# if taint:
				# self._add_to_deleted_domobjs(items)
		else:
			item = self[i]
			if item.previous_sibling:
				item.previous_sibling._next_sibling = item.next_sibling
			if item.next_sibling:
				item.next_sibling._previous_sibling = item.previous_sibling

			# if taint:
				# self._add_to_deleted_domobjs(item)
		MultiPurposeList.__delitem__(self, i)
开发者ID:Ron89,项目名称:vim-orgmode,代码行数:24,代码来源:dom_obj.py

示例4: __delitem__

# 需要导入模块: from orgmode.liborgmode.base import MultiPurposeList [as 别名]
# 或者: from orgmode.liborgmode.base.MultiPurposeList import __delitem__ [as 别名]
	def __delitem__(self, i, taint=True):
		# TODO this method needs more work
		if isinstance(i, slice):
			items = self[i]
			if items:
				first = items[0]
				last = items[-1]
				if first.previous_sibling:
					first.previous_sibling._next_sibling = last.next_sibling
				if last.next_sibling:
					last.next_sibling._previous_sibling = first.previous_sibling
			if taint:
				self._add_to_deleted_headings(items)
			MultiPurposeList.__delitem__(self, i)
		else:
			item = self[i]
			if item.previous_sibling:
				item.previous_sibling._next_sibling = item.next_sibling
			if item.next_sibling:
				item.next_sibling._previous_sibling = item.previous_sibling

			if taint:
				self._add_to_deleted_headings(item)
			MultiPurposeList.__delitem__(self, i)
开发者ID:Yixf-Self,项目名称:vim-orgmode,代码行数:26,代码来源:headings.py


注:本文中的orgmode.liborgmode.base.MultiPurposeList.__delitem__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。