New implementation(patterns)
So.Basically recently I just faced with some problem. I wanted to create my own data type. I created new class put something in it. But I really wanted to set items in it like so: >>>datatype[0][0][1]=1 As you could see I used 3 keys But magic method __setitem__ alows me only to do something like this: === >>>datatype[0,0,1]=1 === And that's a little bit uncomortable. Also...I know that probably everyone sometime wanted to 'hide' class name when you create object and not to write this: === >>>var=MyClass('David') === ...And instead to write this: === >>>var= >>>var <__main__.MyClass object at 0x006242B13748> === I think that would be much easier and glamourus. So here I present you special type of object: pattern Example: === >>>&mypattern='<'str'>' == Here I created variable that stored pattern This pattern allows me to write '<>' with string in this For example from that momemnt if I type '' Nothing will happen. Also patterns can have commands in them: == >>>&mynewpattern='#'list'#' >>> def &mynewpattern: ... return MyClass(list) == Here I gave pattern 'mynewpattern' functionality. Now it RETURNS CLASS!!! This way we could make shorter and more beautiful.In the example list is type of data like string or integer. And now I made that when I type lists with '#'s program returns class MyClass. That's concludes explanation of patterns P.S. Ask me in comments if you didnt understand something. -- https://mail.python.org/mailman/listinfo/python-list
Python installer
Please help me with Python. I many,MANY TIMES tried to install it, but always had problemThese installers were glistchy. What do I mean? I mean that when I installed Python I almost always got wrong packed folders. For example I open python's folder click on python.exe aand.I just get error that there is no module name 'encodings' but it is just in wrong folder-Lib. When I am trying to organize it, still I get some errors. Yeah python.exe works but tkinter does not imports, plus pip cant launch because of the import errors. And I am really tired of this!!! How can I fully expierence Python if installer installs wrong? How? I am really tired of this. I even checked PC on viruses and malwares, but no this glitch HAPPENS. Pleas help to fix this problem and normally program on Python!!! -- https://mail.python.org/mailman/listinfo/python-list
Re: Python installer
d -- https://mail.python.org/mailman/listinfo/python-list
Re: Python installer
суббота, 1 июля 2017 г., 0:25:19 UTC+3 пользователь eryk sun написал: > On Fri, Jun 30, 2017 at 8:30 PM, Debiller 777 > wrote: > > I just get error that there is no module name 'encodings' > > First make sure that neither PYTHONHOME nor PYTHONPATH are defined in > your environment. To check this type `set python` in a command prompt. > Neither variable should be listed. Thank you! -- https://mail.python.org/mailman/listinfo/python-list
Re: Python installer
Thanks a lot. 1 июля 2017 г. 0:16 пользователь "eryk sun" написал: > On Fri, Jun 30, 2017 at 8:30 PM, Debiller 777 > wrote: > > I just get error that there is no module name 'encodings' > > First make sure that neither PYTHONHOME nor PYTHONPATH are defined in > your environment. To check this type `set python` in a command prompt. > Neither variable should be listed. > -- https://mail.python.org/mailman/listinfo/python-list