From 379f178dfb7925b6f93114c9f5c27eba1235818a Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 27 Jun 2017 21:25:41 +0800 Subject: [PATCH] Typo fix in class.md --- guide/src/class.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guide/src/class.md b/guide/src/class.md index 29c57723..2c046050 100644 --- a/guide/src/class.md +++ b/guide/src/class.md @@ -22,7 +22,7 @@ struct MyClass { The above example generates the following implementations for `MyClass` struct -```ignore +```rust,ignore impl PyTypeInfo for MyClass { ... } impl PyTypeObject for MyClass { ... } impl PyObjectWithToken for MyClass { ... } @@ -50,7 +50,7 @@ impl MyClass { #[new] fn __new__(cls: &PyType, ...) -> PyResult> { - cls.tokne().init(|token| { + cls.token().init(|token| { MyClass { num: 10, debug: False, @@ -174,8 +174,8 @@ impl MyClass { } } ``` -From python prespective `method2`, in above example, does not accept any arguments. +From python prespective `method2`, in above example, does not accept any arguments. ## Class methods @@ -227,7 +227,6 @@ impl MyClass { To specify custom `__call__` method for custom class, call method needs to be annotated with `#[call]` attribute. Arguments of the method are speficied same as for instance method. - ```rust #[py::methods] impl MyClass {