Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-05 09:43:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-05 09:43:35 +0400
commitcce9c432953a73afef0c2105c8ff2341d86c0d3e (patch)
tree75a775ac1e71016f222a41573304968a6891fe18 /doc
parentbe025ea31985f7614106b47a519d6e678a19fb95 (diff)
correct api doc examples and a typo
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/bpy.types.Operator.4.py2
-rw-r--r--doc/python_api/examples/bpy.types.Operator.5.py1
-rw-r--r--doc/python_api/rst/info_best_practice.rst2
3 files changed, 3 insertions, 2 deletions
diff --git a/doc/python_api/examples/bpy.types.Operator.4.py b/doc/python_api/examples/bpy.types.Operator.4.py
index 4cb7b02fdc6..861496c6d18 100644
--- a/doc/python_api/examples/bpy.types.Operator.4.py
+++ b/doc/python_api/examples/bpy.types.Operator.4.py
@@ -22,7 +22,7 @@ class CustomDrawOperator(bpy.types.Operator):
my_string = bpy.props.StringProperty(name="String Value")
def execute(self, context):
- print()
+ print("Test", self)
return {'FINISHED'}
def invoke(self, context, event):
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index 7d1a98d4c34..e123768431b 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -31,6 +31,7 @@ class ModalOperator(bpy.types.Operator):
def execute(self, context):
context.object.location.x = self.value / 100.0
+ return {'FINISHED'}
def modal(self, context, event):
if event.type == 'MOUSEMOVE': # Apply
diff --git a/doc/python_api/rst/info_best_practice.rst b/doc/python_api/rst/info_best_practice.rst
index 9e310711bf3..16fd030b42a 100644
--- a/doc/python_api/rst/info_best_practice.rst
+++ b/doc/python_api/rst/info_best_practice.rst
@@ -83,7 +83,7 @@ Even though you're not looping on the list data **python is**, so you need to be
Modifying Lists
^^^^^^^^^^^^^^^
-In python we can add and remove from a list, This is slower when the list length is modifier, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
+In python we can add and remove from a list, This is slower when the list length is modified, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
The most simple way to add onto the end of the list is to use ``my_list.append(list_item)`` or ``my_list.extend(some_list)`` and the fastest way to remove an item is ``my_list.pop()`` or ``del my_list[-1]``.