4 1747
Edward K. Ream wrote: Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/...-in-funcs.html state that the apply function has been deprecated since 2.3.
Can anyone tell me when extended call syntax was actually introduced? Neither googling nor brief checks of the 'What's new in Python' or the pep's has turned up this information.
$ python1.5 -c "print max(*(1, 2))"
File "<string>", line 1
print max(*(1, 2))
^
SyntaxError: invalid syntax
$ python2.0 -c "print max(*(1, 2))"
2
$ python2.1 -c "print max(*(1, 2))"
2
$ python2.2 -c "print max(*(1, 2))"
2
$ python2.3 -c "print max(*(1, 2))"
2
$ python2.4 -c "print max(*(1, 2))"
2
</F>
> > That was in Python 2.0, see
Thanks very much, Martin. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Alan G Isaac |
last post by:
Consider an example due to Mertz (in Text Processing in Python):
apply_each = lambda fns, args=: map(apply, fns, *len(fns))
This allows one to supply a list of functions and a tuple of arguments
to produce a list evaluating each function with those arguments.
But 'apply' is deprecated in favor of extended call syntax.
What is the equivalent with extended call syntax?
Thanks,
Alan Isaac
|
by: George Sakkis |
last post by:
I'm sure there must have been a past thread about this topic but I don't know how to find it: How
about extending the "for <X> in" syntax so that X can include default arguments ? This would be very
useful for list/generator comprehensions, for example being able to write something like:
instead of the less elegant explicit loop version that has to check for the length of each sequence.
What do you think ?
George
|
by: Matik |
last post by:
Hi,
I alredy tried to search this problem in last posts, but I couldn't
find the answer.
I try to access via Extended SP the method in a dll.
I registered the dll as a ExSP, with a name of method. But after
calling it in T-SQL, I became such a error message:
|
by: Neal |
last post by:
Of course, every frame site I've ever seen has reduced usability and all.
We've been through this before.
But as frameset is still a part of HTML, there must be some legitimate use
for it, hmm? For most markup I know when it's useful and when it's not,
but regarding table markup I sure know when it isn't good, but can't
really come up with a way it would be good.
As you all are among the sharpest pencils in the bag, let me ask: Do you...
|
by: wen |
last post by:
i have written python extend module by c/c++, but i saw a module of a
software(pyMOL, you can get it from http://pymol.sourceforge.net/) called
_cmd.pyd instead of _cmd.dll. and it is written by c/c++ also, the author
use makefile to compile it into _cmd.pyd. i have some question about it:
1. what's the difference between them? i saw the code is same as common c++
extended python module, can i use microsoft visual C++ to create a dll...
| |
by: j |
last post by:
Sadly, I don't have a copy of the c89 standard, just a copy of the c99
standard. I was curious if in c89, the type ``long long'' is indeed
considered an extended type that may or may not be implemented by the
implementation? And if it states whether or not the size of ``long
long'' is equal to the size of ``long'' or can be greater than the
size there-of?
|
by: James Stroud |
last post by:
Would anyone else find this syntax useful for generator expressions?
py>
I'm guessing this has been suggested before?
James
|
by: Samuel R. Neff |
last post by:
When is it appropriate to use "volatile" keyword? The docs simply
state:
"
The volatile modifier is usually used for a field that is accessed by
multiple threads without using the lock Statement (C# Reference)
statement to serialize access.
"
But when is it better to use "volatile" instead of "lock" ?
|
by: Juha Nieminen |
last post by:
Let's assume we have a class like this:
//---------------------------------------------------------
#include <iostream>
class MyClass
{
public:
MyClass() { std::cout << "constructor\n"; }
~MyClass() { std::cout << "destructor\n"; }
|
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: 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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |