@@ -748,69 +748,8 @@ impl IntoPyObject for String {
748
748
}
749
749
}
750
750
751
- #[ rustfmt:: skip] // to avoid line splitting
752
- pub fn init ( context : & PyContext ) {
753
- let str_type = & context. str_type ;
754
-
755
- PyStringRef :: extend_class ( context, str_type) ;
756
- // extend_class!(context, str_type, {
757
- // "__add__" => context.new_rustfunc(PyStringRef::add),
758
- // "__bool__" => context.new_rustfunc(PyStringRef::bool),
759
- // "__contains__" => context.new_rustfunc(PyStringRef::contains),
760
- // "__doc__" => context.new_str(str_doc.to_string()),
761
- // "__eq__" => context.new_rustfunc(PyStringRef::eq),
762
- // "__ge__" => context.new_rustfunc(PyStringRef::ge),
763
- // "__getitem__" => context.new_rustfunc(PyStringRef::getitem),
764
- // "__gt__" => context.new_rustfunc(PyStringRef::gt),
765
- // "__hash__" => context.new_rustfunc(PyStringRef::hash),
766
- // "__lt__" => context.new_rustfunc(PyStringRef::lt),
767
- // "__le__" => context.new_rustfunc(PyStringRef::le),
768
- // "__len__" => context.new_rustfunc(PyStringRef::len),
769
- // "__mul__" => context.new_rustfunc(PyStringRef::mul),
770
- // "__new__" => context.new_rustfunc(str_new),
771
- // "__repr__" => context.new_rustfunc(PyStringRef::repr),
772
- // "__str__" => context.new_rustfunc(PyStringRef::str),
773
- // "capitalize" => context.new_rustfunc(PyStringRef::capitalize),
774
- // "casefold" => context.new_rustfunc(PyStringRef::casefold),
775
- // "center" => context.new_rustfunc(PyStringRef::center),
776
- // "count" => context.new_rustfunc(PyStringRef::count),
777
- // "endswith" => context.new_rustfunc(PyStringRef::endswith),
778
- // "expandtabs" => context.new_rustfunc(PyStringRef::expandtabs),
779
- // "find" => context.new_rustfunc(PyStringRef::find),
780
- // "format" => context.new_rustfunc(str_format),
781
- // "index" => context.new_rustfunc(PyStringRef::index),
782
- // "isalnum" => context.new_rustfunc(PyStringRef::isalnum),
783
- // "isalpha" => context.new_rustfunc(PyStringRef::isalpha),
784
- // "isascii" => context.new_rustfunc(PyStringRef::isascii),
785
- // "isdecimal" => context.new_rustfunc(PyStringRef::isdecimal),
786
- // "isdigit" => context.new_rustfunc(PyStringRef::isdigit),
787
- // "isidentifier" => context.new_rustfunc(PyStringRef::isidentifier),
788
- // "islower" => context.new_rustfunc(PyStringRef::islower),
789
- // "isnumeric" => context.new_rustfunc(PyStringRef::isnumeric),
790
- // "isspace" => context.new_rustfunc(PyStringRef::isspace),
791
- // "isupper" => context.new_rustfunc(PyStringRef::isupper),
792
- // "istitle" => context.new_rustfunc(PyStringRef::istitle),
793
- // "join" => context.new_rustfunc(PyStringRef::join),
794
- // "lower" => context.new_rustfunc(PyStringRef::lower),
795
- // "ljust" => context.new_rustfunc(PyStringRef::ljust),
796
- // "lstrip" => context.new_rustfunc(PyStringRef::lstrip),
797
- // "partition" => context.new_rustfunc(PyStringRef::partition),
798
- // "replace" => context.new_rustfunc(PyStringRef::replace),
799
- // "rfind" => context.new_rustfunc(PyStringRef::rfind),
800
- // "rindex" => context.new_rustfunc(PyStringRef::rindex),
801
- // "rjust" => context.new_rustfunc(PyStringRef::rjust),
802
- // "rpartition" => context.new_rustfunc(PyStringRef::rpartition),
803
- // "rsplit" => context.new_rustfunc(PyStringRef::rsplit),
804
- // "rstrip" => context.new_rustfunc(PyStringRef::rstrip),
805
- // "split" => context.new_rustfunc(PyStringRef::split),
806
- // "splitlines" => context.new_rustfunc(PyStringRef::splitlines),
807
- // "startswith" => context.new_rustfunc(PyStringRef::startswith),
808
- // "strip" => context.new_rustfunc(PyStringRef::strip),
809
- // "swapcase" => context.new_rustfunc(PyStringRef::swapcase),
810
- // "title" => context.new_rustfunc(PyStringRef::title),
811
- // "upper" => context.new_rustfunc(PyStringRef::upper),
812
- // "zfill" => context.new_rustfunc(PyStringRef::zfill),
813
- // });
751
+ pub fn init ( ctx : & PyContext ) {
752
+ PyStringRef :: extend_class ( ctx, & ctx. str_type ) ;
814
753
}
815
754
816
755
pub fn get_value ( obj : & PyObjectRef ) -> String {
0 commit comments