Hi,
I was wondering (and have asked on StackOverflow [1] in a more
elaborate way) whether there is a deeper reason to not allow
assignments in lambda expressions.
I'm not criticising, I'm asking in order to know ;-)
The surface-reason is the distinction between assignments and
statements, but wh
+1 for Jinja2. I love that shit
On 2016-10-20 23:16, Adrian Petrescu wrote:
On Thu, 20 Oct 2016 11:34:36 +0200, Tony van der Hoff wrote:
Can anyone recommend a suitable replacement (preferably
compatible with htmltmpl)?
I don't think anything is going to be compatible with htmltmpl, but
Jin
>
> On 23 mei 2016, at 14:19, Peter Otten <__pete...@web.de> wrote:
>
> li...@onemanifest.net wrote:
>
>> I've got a 2D array with values:
>>
>> values = np.array(
>> [[ 20, 38, 4, 45, 65],
>> [ 81, 44, 38, 57, 92],
>> [ 92, 41, 16, 77, 44],
>> [ 53, 62, 9, 75, 12],
>> [ 58, 2, 60, 100,
Hi,
I've got a nympy problem I can't get my head around. (numpy is new to me).
I've got a 2D array with values:
values = np.array(
[[ 20, 38, 4, 45, 65],
[ 81, 44, 38, 57, 92],
[ 92, 41, 16, 77, 44],
[ 53, 62, 9, 75, 12],
[ 58, 2, 60, 100, 29],
[ 63, 15, 48, 43, 71],
[ 80, 97, 87,
Hello everybody - my first post! And it may be the most monumentally
stupid question ever asked, but I just can't see an answer after several
hours experimenting, searching and reading.
It's simply this - how can a function determine whether or not it's
being called in handling of an exception
Hello,
Since I can write the statement like:
>>> print os.path.isdir.__doc__
Test whether a path is a directory
Why do I still need the getattr() func as below?
>>> print getattr(os.path,"isdir").__doc__
Test whether a path is a directory
Thanks!
--
http://mail.python.org/mailman/listinfo/pyt
Thank you.I'm just learning Python and want to make something clear to me.:)
2007/1/20, Steven D'Aprano <[EMAIL PROTECTED]>:
> On Sat, 20 Jan 2007 17:30:24 +0800, Jm lists wrote:
>
> > Hello members,
> >
> > I want to know does the "eval" in pyt
Hello members,
I want to know does the "eval" in python have the same features as in
Perl (capture errors)?
For example,in perl I can wrote:
$re = eval { 1 / 0 };
Though 1/0 is a fatal error but since it's in "eval" block so the perl
interpreter doesn't get exit.
Thanks again.
--
http://mail.
Thanks for all the kind helps!
2007/1/20, Parthan SR <[EMAIL PROTECTED]>:
>
>
> On 1/20/07, Jm lists <[EMAIL PROTECTED]> wrote:
> > hello members,
> >
> > See my script piece below:
> >
> > def testB(shift,**argv):
> > print "first
hello members,
See my script piece below:
def testB(shift,**argv):
print "first argument is %s" %shift
print "all other arguments are:",argv
testB('mails','Jen','[EMAIL PROTECTED]','Joe','[EMAIL PROTECTED]')
It can't work at all.please help tell me the reasons.thanks.
--
http://mail.py
-e line 1, near "}else"
Execution of -e aborted due to compilation errors.
2007/1/19, Diez B. Roggisch <[EMAIL PROTECTED]>:
> Jm lists wrote:
>
> > Please help with this script:
> >
> > class ShortInputException(Exception):
> >
Please help with this script:
class ShortInputException(Exception):
'''A user-defined exception class.'''
def __init__(self,length,atleast):
Exception.__init__(self)
self.length=length
self.atleast=atleast
try:
s=raw_input('E
Simplest I see is to do it manually.
If your array data is numeric compatible
mean = sum(a)/len(a)
as for the standard Deviation it depends on the nature of your data...
check out http://en.wikipedia.org/wiki/Standard_deviation for info on
that... but in all a for loop with a few calculati
Got a question for you all...
I noticed a behaviour in python class creation that is strange, to say
the least.
When creating a class with data members but no __init__ method. Python
deals differently with data members that are muatable and immutables.
Ex:
class A(object):
stringData = "W
I have the below code to get info about SOAP services at a wsdl url. It
gets the in parameters OK but does not seem to get out/return
parameters. Any idea why?
Ben
from SOAPpy import WSDL
import sys
wsdlfile = "http://www.xmethods.net/sd/2001/TemperatureService.wsdl";
server = WSDL.Proxy(wsdl
Am going through Chapter 9 - HTTP Web Services in dive into Python. It
uses the following:
data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read()
The page no longer exists, can anyone recommend an alternative page to
use?
Ben
--
http://mail.python.org/mailman/listinfo/python-l
I am using python 2.4 on Ubuntu dapper, I am working through Dive into
Python.
There are a couple of inconsictencies.
Firstly sys.setdefaultencoding('iso−8859−1') does not work, I have to do
sys.setdefaultencoding = 'iso−8859−1'
secondly the following does not give a 'UnicodeError: ASCII encodin
I have been going through Dive into Python which up to now has been
excellent. I am now working through Chapter 9, XML Processing. I am 9
pages in (p182) in the 'Parsing XML section. The following code is
supposed to return the whole XML document (I have put ti at the end of
this email):
from x
On Mon, 2006-07-24 at 23:16 +0200, Tal Einat wrote:
>
>
snip...
> >
> >
> > I recently gave a Python crash-course in my company, and ran
> into the same
> > problem. There are many good Python tutorials, manuals,
> references etc., most
>
On Mon, 2006-07-24 at 16:39 +, Tal Einat wrote:
> Ben Edwards (lists videonetwork.org> writes:
>
> >
> > Have been working through Dive Into Python which is excellent. My only
> > problem is that there are not exercises. I find exercises are a great
> >
Have been working through Dive Into Python which is excellent. My only
problem is that there are not exercises. I find exercises are a great
way of helping stuff sink in and verifying my learning. Has anyone done
such a thing?
Ben
--
http://mail.python.org/mailman/listinfo/python-list
Skip...
So, so close The problem with this implementation is that it
doesn't monitor usb keyboards under linux at all as far as I can
tellsince no keyboard entry will show up in /proc/interrupts with a
usb keyboard. I absolutely need the keyboard monitoring as well.
Otherwise, your proj
This is an automatic reply to an email you sent to a MySQL mailing address
protected by our 'self-moderation' system. To reduce the amount of spam
received at these addresses, we require you to confirm that you're a real
person before your email will be allowed through.
Unfortunately, we got a bou
23 matches
Mail list logo