what's the problem with the code????Have you seen the replies from Mats Wichmann and Chris Angelico, who
class _NamedIntConstant(int):
def __new__(cls, value, name):
self = super(_NamedIntConstant, cls).__new__(cls, value)
self.name = name
return self
def __repr__(self):
return self.name
__reduce__ = None
MAXREPEAT = _NamedIntConstant(32,name=str(32))
what's the problem with the code????
On Fri, 24 Jun 2022 at 18:43, נתי שטרן <nsh531@gmail.com> wrote:
class _NamedIntConstant(int):
def __new__(cls, value, name):
self = super(_NamedIntConstant, cls).__new__(cls, value)
self.name = name
return self
def __repr__(self):
return self.name
__reduce__ = None
MAXREPEAT = _NamedIntConstant(32,name=str(32))
what's the problem with the code????
You ripped a bunch of code from the standard library without
understanding what it does, and now it doesn't work. The problem is
more with your methodology than your code.
Why are you doing this? Why not simply use what's there?
If you REALLY need to make source-level changes, make *changes*, don't
try to lift small parts out. Also, you will need to spend some hours
getting to know the code that you're mutating.
Is there an alternative newsgroup for lazy-python-users-who-dont-want-to-do-the-work@groups.google.com ?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Op 24/06/2022 om 11:10 schreef נתי שטרן:
OK. I lifted the full library to a HUGE python file that was saved on LAN in MY WORKAnswer this: what is it that your _actually_ trying to do? What is the ultimate goal of all that copying and changing? Cause there is almost
Do I need to lift many other libraries to the file?
I glad to any answer
always a better and easier way.
--
"You can fool some of the people all the time, and all of the people some
of the time, but you cannot fool all of the people all of the time."
-- Abraham Lincoln
"You can fool too many of the people too much of the time."
-- James Thurber
--
https://mail.python.org/mailman/listinfo/python-list
OK. I lifted the full library to a HUGE python file that was saved on LANAnswer this: what is it that your _actually_ trying to do? What is the
in MY WORK
Do I need to lift many other libraries to the file?
I glad to any answer
My TARGET is to bind many code libraries to one Huge code file that works optimally and do optimizations if needed.
In this file have code of huge part of falconpy, ALL code of re, argparse, are and many other code libraries
This code file is contained 10k lines of python code
On Fri, 24 Jun 2022 at 22:16, נתי שטרן <nsh531@gmail.com> wrote:
My TARGET is to bind many code libraries to one Huge code file thatworks
optimally and do optimizations if needed.argparse,
In this file have code of huge part of falconpy, ALL code of re,
are and many other code libraries
This code file is contained 10k lines of python code
Did you check the license terms of all of those libraries? Are you
even legally allowed to do that?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
My TARGET is to bind many code libraries to one Huge code file thatDon't do that. Sorry, it's just as simple as that. Don't do that. All
works optimally and do optimizations if needed.
In this file have code of huge part of falconpy, ALL code of re,
argparse, are and many other code libraries
Op 24/06/2022 om 14:14 schreef נתי שטרן:
My TARGET is to bind many code libraries to one Huge code file thatDon't do that. Sorry, it's just as simple as that. Don't do that. All
works optimally and do optimizations if needed.
In this file have code of huge part of falconpy, ALL code of re,
argparse, are and many other code libraries
those modules are not designed to put together like that, all their namespaces merged together. Don't do it.
Even if you could eventually get it to work, it would not be any more optimal.
If you need more performance, look into things like Pypy or Cython.
--
"Experience is that marvelous thing that enables you to recognize a
mistake when you make it again."
-- Franklin P. Jones
My TARGET is to bind many code libraries to one Huge code file that works >optimally and do optimizations if needed.
In this file have code of huge part of falconpy, ALL code of re, argparse, >are and many other code libraries
This code file is contained 10k lines of python code
I copied most of the libraries from cython
On Fri, 24 Jun 2022 18:27:33 +0300, ??? ???? <nsh531@gmail.com> declaimed
the following:
I copied most of the libraries from cython
I doubt that... cython is a specialized Python COMPILER system. "CPython" is the common interpreted Python language (implemented in C), and is the most likely source of the packages you are mongrelizing..
https://cython.org/
"""
Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes writing C extensions for Python as easy as Python itself.
"""
"""
The Cython language is a superset of the Python language that additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code. The C code is generated once and then compiles with all major C/C++ compilers in CPython 2.6, 2.7 (2.4+ with Cython 0.20.x) as well as
3.3 and all later versions.
"""
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com
http://wlfraed.microdiversity.freeddns.org/
--
https://mail.python.org/mailman/listinfo/python-list
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 25:07:10 |
Calls: | 6,646 |
Calls today: | 1 |
Files: | 12,193 |
Messages: | 5,327,787 |