Ron Adam wrote:
Given the statement:
a = None
And the following are all true:
a == None
Okay.
(a) == (None)
Okay.
(a) == ()
Whoops! a (which is None) is equal to the empty tuple (which is not None)?
(None) == ()
Then this conceptual comparison should also be true:
if
Overview
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python. CSP is class of problems which may be represented
in terms of variables (`a`, `b`, ...), domains (`a in [1, 2, 3]`, ...),
Far from a professional programmer, I'm simply a
newbie Python user. Two basic questions:
1. I don't want to post banal questions about Python
to main Python list. Does a banal Python questions
list or a Python beginners list exist?
2. There is somewhere a very patient fellow willing to
be my
On Wed, 06 Jul 2005 16:32:42 GMT, William Gill [EMAIL PROTECTED] wrote:
Excuse me for intruding, but I followed examples and ended up with a
similar architecture:
from Tkinter import *
class MyMain(Frame):
def __init__(self, master):
self.root = master
Perhaps irc://irc.freenode.net##python
Note the double #
This channel is less crowed as the #python channels are.
Alessandro Brollo schrieb:
Far from a professional programmer, I'm simply a
newbie Python user. Two basic questions:
1. I don't want to post banal questions about Python
to
On Wed, 6 Jul 2005 14:56:09 +0200, Sybren Stuvel [EMAIL PROTECTED] wrote:
...
I'm usually annoyed by IDEs because, for instance, they don't use VIM
as an editor. Since I'm hooked to that, all IDEs I've used so far have
failed to impress me.
Same here (s/VIM/Emacs/, or course).
I try not to
1. I don't want to post banal questions about Python
to main Python list. Does a banal Python questions
list or a Python beginners list exist?
Yes:
http://mail.python.org/mailman/listinfo/tutor
There are plenty of people there that will be glad to help!
=Tony.Meyer
--
[EMAIL PROTECTED] (Bengt Richter) writes:
On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote:
I'm trying to implement __iter__ on an abstract base class while I don't
know whether subclasses support that or not.
Will a property or custom descriptor do what you want?
Alessandro Brollo said unto the world upon 07/07/2005 03:24:
Far from a professional programmer, I'm simply a
newbie Python user. Two basic questions:
1. I don't want to post banal questions about Python
to main Python list. Does a banal Python questions
list or a Python beginners list
Op 2005-07-07, Philippe C. Martin schreef [EMAIL PROTECTED]:
Almost sounds like a racist comment - sorry if I misunderstood
I'll clarify. A lot of the time I hear arguments against
features that boils down to.
1) I don't need it.
2) Having the feature will make my job more difficult.
Steven Bethard wrote:
If you're really afraid of two lines, write it as:
def r(): randint(1, 100)
This is definitely a bad case for an anonymous function because it's not
anonymous! You give it a name, r.
This is something I've never understood. Why is it bad
form to assign an
Ron Adam wrote:
Why would you want to use None as an integer value?
If a value isn't established yet, then do you need the name defined?
Wouldn't it be better to wait until you need the name then give it a value?
Er, maybe I'm misunderstanding something here, but
surely the most obvious
Jorgen Grahn wrote:
Emacs and vim are almost always installed, or trivially installable. All I
need to remember is to bring my emacs config file.
And, fortunately, USB pen drives are now big enough to hold it!
--
http://mail.python.org/mailman/listinfo/python-list
Please help me i down loaded python nd itplays on MS-DOS mode and not on normal
please help
[EMAIL PROTECTED]
--
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
--
Use:
dt =3D datetime(*t)
Thanks for the quick reply.
I can't find any doc about '*' used in this context. Have you some url
or suggestion for which terms search in Google?
--
http://mail.python.org/mailman/listinfo/python-list
On 6 Jul 2005 08:28:45 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi All,
Does anyone have a good template that I might use for writing a python
paper in latex/bibtex? I've got the paper mostly done, but am having
issues with the references. I am definitely not an expert at
Ert Ert wrote:
Please help me i down loaded python nd itplays on MS-DOS mode and not on
normal please help
So what's your problem? Please read
http://www.catb.org/~esr/faqs/smart-questions.html
Then reformulate your question so that we can answer it.
--
Robert Kern
[EMAIL PROTECTED]
In
Steven D'Aprano wrote:
This is something I've never understood. Why is it bad
form to assign an anonymous function (an object) to a
name?
Because it obfuscates your code for no benefit. You should avoid making it
hard for others to read your code (and 'others' includes yourself in the
Hi, have you seen the python ML at www.python.it? It's in Italian. You
can find even other tutorial for beginners here.
See also www.zonapython.it
--
http://mail.python.org/mailman/listinfo/python-list
Negroup wrote:
Use:
dt =3D datetime(*t)
Thanks for the quick reply.
I can't find any doc about '*' used in this context. Have you some url
or suggestion for which terms search in Google?
http://www.python.org/doc/2.4.1/tut/tut.html
Then read this section
4.7.4 Unpacking Argument Lists
Gustavo Niemeyer ha scritto:
Overview
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python. CSP is class of problems which may be represented
in terms of variables (`a`, `b`,
I would like to create a script that can export ai-files to jpg-files
using the export function available in Adobe Illustrator. Can someone
tell me how to dispatch the illustrator com-object to make this
possible and possibly provide me with some tips on how to accomplish
this?!
Thanks in advance
Ahah, I've to save this page.
p.s. @ Ert Ert: download this:
http://starship.python.net/crew/mhammond/win32/ and use 'Pythonwin'
(or, use Unix!)
--
http://mail.python.org/mailman/listinfo/python-list
Agreed, I dislike map and its ilk as well.
However, they are handy in some cases. I particularly like the way Ruby
deals with this problem. Instead of all these functions, internal
iterators and true anonymous blocks are used.
Case in point:
def gt_than_5(obj):
return obj 5
results =
Michael == Michael Hoffman [EMAIL PROTECTED] writes:
Michael Greg Lindstrom wrote:
I hear that Perl 6 is going to have a rewrite of regular
expressions; it will be interesting to see what their hard work
produces.
Michael From what I saw a while ago, it didn't look like
Do you have an exception handling dialog ?
Can you use the UI layer without being tied to the rest of the
framework ? They seemed pretty integrated to me.
Best Regards,
Fuzzy
http://www.voidspace.org.uk/pythonhave an
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone,
I started embedding python into a 3D graphics App and I came
across this linking problem.
SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol
__imp__Py_InitModule4TraceRefs
SO.lib(ScnNode.obj) : error LNK2001: unresolved external symbol
__imp___Py_RefTotal
On Thu, Jul 07, 2005 at 04:52:11AM -0700, J wrote:
Hi everyone,
I started embedding python into a 3D graphics App and I came
across this linking problem.
SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol
__imp__Py_InitModule4TraceRefs
SO.lib(ScnNode.obj) : error
Hello Jochen,
I started embedding python into a 3D graphics App and I came
across this linking problem.
SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol
__imp__Py_InitModule4TraceRefs
SO.lib(ScnNode.obj) : error LNK2001: unresolved external symbol
__imp___Py_RefTotal
Hi, I would like to know if it is possible to change code on the fly on a
python interpreter. I want to have a python script running a multithread
server and be able to connect to this python script and change the
interpreter environment. Is this possible?
Ideally i would like to call python,
Simon Brunning [EMAIL PROTECTED] writes:
http://wiki.python.org/moin/PythonDecoratorLibrary?#head-de01988728ccdec415708f10928cc6feb022e7bb
Neat.
I guess about 75% about programming-related things classified as neat-o or
convenient! are already implemented by some Pythonista(s). Spoils all the
Mike Meyer wrote:
Shai [EMAIL PROTECTED] writes:
They're called Special vars, and you need to define them (unlike
local LISP variables, which behave essentially like Python vars), but
then you use them just like other vars (that is, you usually bind them
with LET). This is the first I
Hello Jochen,
I started embedding python into a 3D graphics App and I came
across this linking problem.
SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol
__imp__Py_InitModule4TraceRefs
SO.lib(ScnNode.obj) : error LNK2001: unresolved external symbol
__imp___Py_RefTotal
1. LDAP module should be included in the base distro.
2. DNS library really should be included in the base library, I emailed
Anthony Baxter and he replied, saying it was almost done.
3. Ipython would be nice
--
http://mail.python.org/mailman/listinfo/python-list
Thank you very much Miki!
That was an easy solution. It links... I will put a hold on compiling
the latest version until I really have to. I will probably switch to VC
7 before that.
Cheers
Jochen
Miki Tebeka wrote:
Hello Jochen,
I started embedding python into a 3D graphics App and I came
For my sins I'm a MS Windows user at work and apart from that I have a
small problem ...
I like to write python scripts to do small tasks and then double click
on them from the file explorer to run them.
Unfortunately I'm not perfect and sometimes I make mistakes and have
unhandled exceptions or
* Giles Brown (2005-07-07 13:56 +0100)
For my sins I'm a MS Windows user at work and apart from that I have a
small problem ...
I like to write python scripts to do small tasks and then double click
on them from the file explorer to run them.
Unfortunately I'm not perfect and sometimes I
chand wrote:
Hi..
I am writing a Gui in TCL and my backend code is python. I want to call
python procedure in tcl using tclpyhton. I want to know clearly how
this should be implemented.
let's say I have procedure test_function(arg1,arg2 ...) defined in
test.py.
I want to call this
Nah. You're missing my point. I only want the command window not to
be closed if there is an *exception*. Picky I know, but there you go.
Giles
--
http://mail.python.org/mailman/listinfo/python-list
Jeff Epler [EMAIL PROTECTED] wrote:
Pierre wrote:
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on wi=
n32
=
^^^
Here's the bug. You're using Windows. It's a filesystem, but not as we kn=
ow it...
On 07.07.2005, at 15:25, Giles Brown wrote:
Nah. You're missing my point. I only want the command window not to
be closed if there is an *exception*. Picky I know, but there you go.
well, then register raw_input as exit function:
import atexit
atexit.register(raw_input)
works fine in
That is exactly i want to know. i.e...,how to provide the python code
path in tcl script file, that loads required function.
--BestRegards.,
--chandra
definitions etc.
Michael Schlenker wrote:
chand wrote:
Hi..
I am writing a Gui in TCL and my backend code is python. I want to call
On 07.07.2005, at 15:43, harold fellermann wrote:
On 07.07.2005, at 15:25, Giles Brown wrote:
Nah. You're missing my point. I only want the command window not to
be closed if there is an *exception*. Picky I know, but there you go.
well, then register raw_input as exit function:
Use sys.excepthook to hook a function you define and in that function
print a traceback and pause before exiting. Something like (not tested
but copied from working example):
import sys
def Myexcepthook(type, value, traceback):
print in Myexcepthook-type=, type, value=,value,
The traditional use of gettimeofday() to (insecurely and unreliably)
approximate elapsed local time is one of my pet peeves.
Fortunately a real monotonic clock has finally been added to the linux
kernel and glibc:
http://www.imperialviolet.org/page24.html#e474
If you have a recent enough kernel
Gustavo Niemeyer wrote:
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python.
Very cool! I can't wait to get some time to play with this.
--
Benji York
--
Thanks for your replies.
I think we might have a miscommunication here as (to my understanding)
neither of your replies actually solve my problem.
After all, the function raw_input is just another way of blocking until
user input. I was already doing that using os.system('pause').
To recap,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Does anyone have a good template that I might use for writing a python
paper in latex/bibtex? I've got the paper mostly done, but am having
issues with the references. I am definitely not an expert at
latex/bibtex. Right now, I have references
I'm trying to learn about introspection in Python. my ultimate goal
is to be able to build a module text database of all modules that
are in the sys.path, by discovering all candidate modules (I've
already done that), importing all of them, and then introspecting on
each module to discover its
Giles Brown [EMAIL PROTECTED] writes:
Nah. You're missing my point. I only want the command window not to
be closed if there is an *exception*. Picky I know, but there you go.
I find it useful to set an sys.excepthook which calls the debugger
pdb.pm(). This way I not only see the
Hi Larry,
I mentioned how I am already using sys.excepthook in my initial
posting.
What I'm looking for is:
1) Is there any better way of solving the problem than setting
sys.excepthook in sitecustomize.py?
2) Or is there a better way of detecting when I am running a .cmd based
script than the
harold fellermann wrote:
sorry, I did not think. if you want to wait for input _only_ if
an exception occured, your exit function needs to check for the
exception:
import atexit
def wait_on_exc() :
... import sys
... if sys.exc_type :
... raw_input()
...
Giles Brown wrote:
The special first line is:
@pythoncmd -x %~f0 %* exit /b
(In the python.org FAQ for windows it says
@setlocal enableextensions python -x %~f0 %* goto :EOF
but since I have no idea which is right I chose the simpler looking
one)
This approach does require
On 2005-07-07, Ron Adam [EMAIL PROTECTED] wrote:
class demo:
def foo(v=None):
if v is not None:
self.v = v
return self.v
You are really checking if v exists, so having it undefined in
namespace as the default is consistent with what you are
On 2005-07-07, Alessandro Brollo [EMAIL PROTECTED] wrote:
Far from a professional programmer, I'm simply a newbie Python
user. Two basic questions:
1. I don't want to post banal questions about Python to main
Python list.
Go ahead. We're really quite nice. Extraordinarily so by
Usenet
Hooray! We have a winner!
Thanks Duncan. Your improved shell line will do the job very nicely.
:)
(btw, the problem with import sethook at the top of the script is
that syntax errors in the top-level will prevent the import from being
run meaning we don't get our traceback anymore.)
Giles
--
On Thu, 07 Jul 2005 06:47:54 -0400, Chris Smith wrote:
Michael == Michael Hoffman [EMAIL PROTECTED] writes:
Michael Greg Lindstrom wrote:
I hear that Perl 6 is going to have a rewrite of regular
expressions; it will be interesting to see what their hard work
produces.
Tom Anderson wrote:
def flatten(ll):
return reduce(lambda a, l: a.extend(l), ll, [])
How would one do that as a list comp, by the way? I'm really not very good
with them yet.
Not really a list-comprehension based solution, but I think what you want is
ll=[[1,2],[3,4,5],[6]]
sum(ll,[])
Ert Ert wrote:
Please help me i down loaded python nd itplays on MS-DOS mode and not on
normal please help
Python itself is a command line program. MS-DOS mode *is* it's normal
mode.
As other's have mentioned, there are graphical front ends to Python
which you may be more comforatble with.
On Thu, 07 Jul 2005 09:36:24 +, Duncan Booth wrote:
Steven D'Aprano wrote:
This is something I've never understood. Why is it bad
form to assign an anonymous function (an object) to a
name?
Because it obfuscates your code for no benefit. You should avoid making it
hard for others
Francois De Serres wrote:
PyGILState_STATE gil = PyGILState_Ensure();
result = PyEval_CallObject(my_callback, arglist);
PyGILState_Release(gil);
Py_DECREF(arglist);
Py_DECREF(result);
I think this should be:
PyGILState_STATE
=?ISO-8859-2?Q?Pawe=B3?= Sakowski [EMAIL PROTECTED] wrote:
ll=[[1,2],[3,4,5],[6]]
sum(ll,[])
[1, 2, 3, 4, 5, 6]
That's a great argument for list.__add__ having the semantics of
extend rather than append 8-)
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
___ | Frankly I have
Addendum - forgot to mention that the problem with checking the
extension of sys.argv[0] is that sys.argv[0] is not set until after
sitecustomize.py is run (and it needs to be in sitecustomize.py not an
imported module due to the top-level SyntaxError problem mentioned in
my other post).
Cheers
Hi,
I'm trying to write a small installer for a server. But this program
should be able to run in the future under heterogenous environments and
os (at least linux/windows). I mean, the install will be done either in
text mode or curses or gtk or tk, either in debian or windows 2000 and
so on...
On Thu, 07 Jul 2005 09:51:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] (Bengt Richter) writes:
On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote:
I'm trying to implement __iter__ on an abstract base class while I don't
know whether subclasses
Reinhold Birkenfeld wrote:
Ron Adam wrote:
Given the statement:
a = None
And the following are all true:
a == None
Okay.
(a) == (None)
Okay.
(a) == ()
Whoops! a (which is None) is equal to the empty tuple (which is not None)?
It's not an empty tuple, it's an empty
On 7 Jul 2005 15:46:23 GMT, Duncan Booth [EMAIL PROTECTED] wrote:
Steven D'Aprano wrote:
Put it this way: whenever I see a two-line def as above, I can't help
feeling that it is a waste of a def. (Somebody went to all the trouble
to define a function for *that*?) Yet I would never think the
On Thu, 7 Jul 2005, Ron Adam wrote:
Stian Søiland wrote:
Or what about a recursive generator?
That's the sort of thing i like to see!
Ok, lets see... I found a few problems with the testing (and corrected
it) so the scores have changed. My sort in place routines were cheating
because
Kurt,
Try http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL and search
this site (the famous UK TeX FAQ) at
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes#search for
other info.
You might also ask this question at the comp.text.tex group (which, in
my experience, is as nice as
Steven D'Aprano wrote:
On Thu, 07 Jul 2005 09:36:24 +, Duncan Booth wrote:
Steven D'Aprano wrote:
This is something I've never understood. Why is it bad
form to assign an anonymous function (an object) to a
name?
Because it obfuscates your code for no benefit. You should avoid making
Sometimes it could be handy, e.g., cutting short iteration:
def raisex(self, *args):
... raise self.__class__(self, *args)
...
Exception.raisex = raisex
list(i for i in xrange(20) if i10 or StopIteration().raisex())
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
list(i for i in xrange(20) if i15
Raymond Hettinger wrote:
For a simple example, convert both 10247448370872321 and
10247448370872319 from base ten to 4 digits of hex. The calculations
need to be carried out to 15 places of hex (or 17 places of decimal)
just to determine whether the fourth hex digit is a 7 or 8:
Tom Anderson [EMAIL PROTECTED] writes:
Stian Søiland wrote:
Or what about a recursive generator?
That's the sort of thing i like to see!
That can be a neat method. It's a pretty verbose way to do flatten(),
but it's a good example:
def flatten(l):
for e in l:
if isinstance(e,
Hi !
Try :
def ff(a):
print a*2
ff(111)
exec('''def ff(a):
print a*3
''',globals(),globals())
ff(111)
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 7 Jul 2005, Steven D'Aprano wrote:
On Wed, 06 Jul 2005 14:28:55 +0100, Tom Anderson wrote:
del - delete
How about just getting rid of del? Removal from collections could be done
with a method call,
Which would be called object.del() I presume.
That would be fine.
And that opens
On Thu, 07 Jul 2005 18:10:44 +1000, Gregory Bond [EMAIL PROTECTED] wrote:
Jorgen Grahn wrote:
Emacs and vim are almost always installed, or trivially installable. All I
need to remember is to bring my emacs config file.
And, fortunately, USB pen drives are now big enough to hold it!
Hey,
Hello,
How do i print values returned by Py_BuildValue in Linux?
PyObject *obj = Py_BuildValue({s:i}, Status, status);
I need to print the Status value here
-Thanks,
Ashton
--
http://mail.python.org/mailman/listinfo/python-list
Benjamin Rutt wrote:
I'm trying to learn about introspection in Python. my ultimate goal
is to be able to build a module text database of all modules that
are in the sys.path, by discovering all candidate modules (I've
already done that), importing all of them, and then introspecting on
Grant Edwards wrote:
On 2005-07-07, Ron Adam [EMAIL PROTECTED] wrote:
It would be a way to set an argument as being optional without
actually assigning a value to it.
So it would still work like you expect even though v is not
bound to anything. Like I said the bigger problem is that
globals
Steven D'Aprano wrote:
Ron Adam wrote:
Why would you want to use None as an integer value?
If a value isn't established yet, then do you need the name defined?
Wouldn't it be better to wait until you need the name then give it a
value?
Er, maybe I'm misunderstanding something here,
Daniel Dittmar [EMAIL PROTECTED] writes on Wed, 06 Jul 2005 16:12:46 +0200:
Peter Hansen wrote:
Arguing the case for del: how would I, in doing automated testing,
ensure that I've returned everything to a clean starting point in
all cases if I can't delete variables? Sometimes a global is
Thomas Heller [EMAIL PROTECTED] writes on Wed, 06 Jul 2005 18:07:10 +0200:
Thomas Heller [EMAIL PROTECTED] writes:
...
class Base:
def __getattr__(self, name):
if name == __iter__ and hasattr(self, Iterator):
return self.Iterator
raise AttributeError,
I have created what I think may be a useful Python module, but I'd like
to share it with the Python community to get feedback, i.e. if it's
Pythonic. If it's considered useful by Pythonistas, I'll see about
hosting it on Sourceforge or something like that. Is this a good forum
for exposing
On Thu, Jul 07, 2005 at 03:40:10AM -0300, Gustavo Niemeyer wrote:
Overview
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python. CSP is class of problems which may be
Am I just weird?
I feel the same way about where to use lambda's and where *not*
I come from C and C++ background and defining a function at the top
level (no nested functions) would always require good reasons
function name has to be remembered, to put it in other words it has to
be added in
Edvard Majakari wrote:
Simon Brunning [EMAIL PROTECTED] writes:
http://wiki.python.org/moin/PythonDecoratorLibrary?#head-de01988728ccdec415708f10928cc6feb022e7bb
Neat.
I guess about 75% about programming-related things classified as neat-o or
convenient! are already implemented by some
Jacob Page wrote:
I have created what I think may be a useful Python module, but I'd like
to share it with the Python community to get feedback, i.e. if it's
Pythonic. If it's considered useful by Pythonistas, I'll see about
hosting it on Sourceforge or something like that. Is this a good
On Wednesday 06 July 2005 09:28, [EMAIL PROTECTED] [EMAIL PROTECTED]
([EMAIL PROTECTED]) wrote:
Hi All,
Does anyone have a good template that I might use for writing a python
paper in latex/bibtex? [...]
When I cite these, I get something like this (Foundation[2005]).
Questions like
[EMAIL PROTECTED] (Bengt Richter) writes:
On Thu, 07 Jul 2005 09:51:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] (Bengt Richter) writes:
On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote:
I'm trying to implement __iter__ on an abstract base class
jayessay [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
1. Someone recently remarked that good Lisp macros are basically
executable pseudo code. I think that is pretty much exactly right
and is a pretty good sound bite distillation of what it is all
about.
Several years
Fabio == Fabio Zadrozny [EMAIL PROTECTED] writes:
I agree about the project management part. Though I would still love
to use Eclipse instead, if it only was supported for my line of work
:-/.
Fabio What line of work is not supported in eclipse?
C++ programming for Symbian
Antoon Pardon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'll clarify. A lot of the time I hear arguments against
features that boils down to.
1) I don't need it.
2) Having the feature will make my job more difficult.
3) I don't understand the merrits of the feature or I
Terry Reedy wrote:
jayessay [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
1. Someone recently remarked that good Lisp macros are basically
executable pseudo code. I think that is pretty much exactly right
and is a pretty good sound bite distillation of what it is all
about.
The difference in readability between
func = lambda x: x**3 - 5*x
def func(x):
return x**3 - 5*x
def func(x): return x**3 - 5*x
is obviously a matter of personal vision.
The fuctional difference (and, I believe, the only difference) is that the
def form attaches the specific name 'func'
Hi,
I'm hoping that someone can point me in the right direction with this.
What I would like to do is calculate the average time it takes to load
a page. I've been searching the net and reading lots but I haven't
found anything that helps too much. I'm testing our web site and hiting
+6000 urls
Robert Kern wrote:
Jacob Page wrote:
I have created what I think may be a useful Python module, but I'd
like to share it with the Python community to get feedback, i.e. if
it's Pythonic. If it's considered useful by Pythonistas, I'll see
about hosting it on Sourceforge or something
Pawe³ Sakowski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Tom Anderson wrote:
def flatten(ll):
return reduce(lambda a, l: a.extend(l), ll, [])
How would one do that as a list comp, by the way? I'm really not very
good
with them yet.
Not really a list-comprehension based
greg 1. Is there a better time function to use?
For this particular scenario I think time.time() is probably what you want:
cumulative = 0.0
n = 0
for link in links:
t = time.time()
ie.Navigate(link)
cumulative += time.time() - t
n += 1
print
Hello Alexandre,
People interested in CSP and python may also want to check Logilab's
constraint module which has been available from some time at:
http://www.logilab.org/projects/constraint/
Indeed! And please send us some notes comparing both. :-)
The AIMA book inspired me to write that
Robert Kern wrote:
Jacob Page wrote:
Does this newsgroup find attachments acceptable?
No. Please put files somewhere on the web and post a URL. This would be
a good forum to informally announce and discuss your module.
To add to what Robert said, keep in mind this newsgroup is also
1 - 100 of 174 matches
Mail list logo