I understand that the standard Python distribution is considered
the C-Python. Howerver, the current C-Python is really a combination
of C and Python implementation. There are about 2000 Python files
included in the Windows version of Python distribution. I'm not sure
how much of the C-Python is implemented in C but I think the more
modules implemented in C, the better performance and lower memory
footprint it will get.
I wonder if it's possible to have a Python that's completely (or at
least for the most part) implemented in C, just like PHP - I think
this is where PHP gets its performance advantage. Or maybe I'm wrong
because the core modules that matter are already in C and those Python
files are really a think wrapper. Anyhow, if would be ideal if Python
has performance similar to Java, with both being interpreted languages.
Jack
Dec 9 '07
71 3343
In article <ma************ *************** ************@py thon.org>,
Christian Heimes <li***@cheimes. dewrote:
>Steven D'Aprano wrote:
>> I'm not quite sure I understand that criticism. How is that different from things which are not properties?
foo.baz = 2 # oops, I meant bar
will succeed regardless of whether foo.bar is an attribute or a property.
Unless it's a new style class with __slots__
[....]
Naw, I'll skip the rant this time. ;-)
--
Aahz (aa**@pythoncra ft.com) <* http://www.pythoncraft.com/
"Typing is cheap. Thinking is expensive." --Roy Smith
sturlamolden a écrit :
On 13 Des, 19:16, "Chris Mellon" <arka...@gmail. comwrote:
Personally I find properties atrocious and unsafe.
What a strange observation from someone wanting to introduce defmacros
and customizable syntax in Python....
One cannot
distinguish between a function call and binding an attribute in a
statement like:
FWIW, "binding an attribute" will *alway* require some function call...
Properties - or any other computed attributes - are just hooks into the
default __setattr__ implementation so you can customize it.
foo.bar = 2 # Does this call a function or bind an attribute?
From the client code POV, it binds an attribute - whatever the
implementation is.
From the implementation POV, it will always call a couple functions.
What's you point, exactly ?
# Is this foo.setBar(2) or setattr(foo,'ba r',2)?
Why do you care ? Ever heard about the concept of "encapsulat ion" ?
Even worse: if we make a typo, the error will not be detected as the
syntax is still valid.
So what ? This has nothing to do with properties.
Properties and dynamic binding do not mix.
Sorry, but IMVHO, this is total bullshit. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ira Baxter |
last post by:
My understanding is that Zend are the folks behind the one and only
PHP implementation. Now that PHP5 is released, I'm quite interested
in using it.
However, the documentation avialable at PHP.NET suggests that it
isn't by Zend. What reason is there to believe it is complete
and accurate in any sense? (There's lot of user clarifications
which show that it isn't complete).
In particular, the section of PHP5 has parts that are...
|
by: Aryeh M. Friedman |
last post by:
If have something like the following declartion:
enum foo {One,Two,....,Ten};
How do I determine how many elements (enumerations)... in this case it is
obviously 10 but I don't want to hard code that fact
--Aryeh
|
by: Nobody |
last post by:
Heres the deal... I have an application where I have a list (as in a Windows
list control, but thats not important) displayed to the user. I sort this
list based on the list controls sort function (again, its not important that
its Windows) which ends up calling a compare function in my code:
int CompareFunc(char* str1, char* str2)
{
}
this function returns -1, 0 or 1 which gets passed on to the internal quick
|
by: Silas |
last post by:
Hi,
I use view to join difference table together for some function. However,
when the "real" table fields changed (e.g. add/delete/change field). The
view table still use the "old fields".
Therefore everytimes when I change the real table, I also needed open the
view table and save it by SQL enterprise manager manually for update the
view table field.
|
by: Simon Verona |
last post by:
I have some Windows Forms software that I'm developing that uses a remote
server (called using remoting) to provide the business rules and dataaccess.
For development purposes the client and server portions are both running on
my PC. I was wondering if there was some way that for "real world"
performance, I could somehow "throttle" the tcp/ip stack so that calls to
localhost had some lag to represent the latency/bandwidth of a real...
| |
by: David Garamond |
last post by:
I want to know how functional indexes are used "in the real world". Here
are the common uses:
* non-unique index on the first parts of a longish text field
(SUBSTRING(field)) to save disk space, while still allowing faster
searches than a sequential scan.
* indexing on LOWER(field)/UPPER(field) to allow case-insensitive
searches or case-insensitive unique constraint.
|
by: playagain |
last post by:
Please help me to build a list of examples of stack and queue in real life situation...
Conditions:
The object concerned must only one object.
And the object must be tangible.
Example:
Queue (FIFO): The bullet in a machine gun..(you cannot fire 2 bullets at the same time)
Stack (LIFO): The tennis balls in their container.. (you cannot remove 2 balls at the same time)
|
by: Tyno Gendo |
last post by:
Hi everyone
I need to move on a step in my PHP...
I know what classes are, both in PHP4 and 5 and I'm aware of "patterns"
existing, but what I'm looking for are some real world projects eg. Open
Source that people consider to use classes and patterns correctly.
I lack a senior person to lead me in this so I feel I'm losing out on
only using bare PHP class features and not really knowing how to design
|
by: jamesicus |
last post by:
.......... just for curiosity?
"real" XHTML served as content (MIME) type application/xhtml+xml will display in MSIE 6.0 release 2900 and 7.0 but they will not render xml content. However, MSIE 6.0 release 2800 and earlier displays a download screen -- selecting OPEN presents a plain, text only, rendered page -- sans style sheet.
Here is an XHTML page served as content (MIME) type application/xhtml+xml for testing by those interested.
...
|
by: Ignacio Machin ( .NET/ C# MVP ) |
last post by:
The difference between compile & runtime. CreateInstance works at
runtime, you can pass ANY string to it (even an incorrect one like
"123123123123") and it will compile
Only at runtime you will get the error.
And honestly, you HAVE to know something about your Class. otherwise,
how do you know which method to call?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |