Haha!
On 14 August 2014 14:54, Steven D'Aprano st...@pearwood.info wrote:
Nothing to do with Python, but awesome: OpenOffice won't print on
Tuesdays.
https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161/comments/28
--
Steven
--
Hi Max,
In Python, we prefer readability over anything else. The simpler you can
write it, the better it can be understood.
That said, I've never considered using (i, j, k) as a vector component
before. I've always done something akin to:
vector = Vector(2, 4, 6)
print
There is a built-in function that reverses an iterable. Have a look at the
documentation.
xav
On 27 March 2013 10:59, rahulredd...@hotmail.com wrote:
So i have a set of for loops that create this :
***
*** *** *** *** *** *** ***
*** ***
Hi Sam,
Did you compile your OpenCV with gstreamer? That's where I'd look first.
Cheers,
Xav
On 18 February 2013 01:15, Sam Berry sambez...@hotmail.co.uk wrote:
Hi Xav,
Iv been looking into OpenCV, i can easily stream my laptops webcam using
this code.
import cv2
On 6 February 2013 23:12, Sam Berry sambez...@hotmail.co.uk wrote:
I have no vast knowledge of python, but i came across this code to capture
video from my IP camera
This code works, however when i try to playback the .avi file in VLC
player...
I've been working with several IP cameras
On 7 February 2013 00:12, Sam Berry sambez...@hotmail.co.uk wrote:
Hi,
This is for a university project.
My issue is that i have built an App using pythons Kivy module, and i need
to be able to stream and record from an IP camera upon request.
I have just used the VLC.exe to stream the
Hey all,
I ran the example code on multiprocessing. On the Pool example, an
assertion failed with testing garbage collection.
Traceback (most recent call last):
File test.py, line 314, in module
test()
File test.py, line 295, in test
assert not worker.is_alive()
AssertionError
The
You can always try http://stackoverflow.com/search?q=ArcPY, or post your
question there.
Cheers,
Xav
On 13 December 2012 08:07, Michelle Couden michelle.cou...@txdot.govwrote:
Does anyone know of a website or forum where there is help for ArcPY
(Python) programmers? ESRI’s (GIS) resource
What operating system are you running?
Cheers,
Xav
On 26 April 2012 13:08, deuteros deute...@xrs.net wrote:
I'm fairly new to Python I have version 2.7 installed on my computer.
However
my professor wants us all to use the latest version of Python. How do I go
about upgrading? Do I just
Hello,
I discovered this strange property by accident:
Python 2.7.2 (default, Nov 21 2011, 17:25:27)
[GCC 4.6.2] on linux2
Type help, copyright, credits or license for more information.
None 0
True
None == 0
False
None 0
False
int(None)
Traceback (most recent call last):
File stdin, line
Good to see Python3 got rid of that confusion :]
Cheers,
Xav
On 17 January 2012 16:50, Chris Angelico ros...@gmail.com wrote:
On Tue, Jan 17, 2012 at 5:47 PM, Xavier Ho cont...@xavierho.com wrote:
What was the rationale behind this design? Specifically, (None 0) ==
True
and (None == 0
It sounds like Fabric is what you're after. We use it at work and it's the
best thing since ssh. ;]
http://docs.fabfile.org/en/1.3.2/index.html
(Actually, it uses ssh internally and allows you to do remote shell-like
programming in a pythonic fashion.)
Cheers,
Xav
On 15 November 2011 22:04,
http://www.ideone.com/infch
^ Result of the below code
On 29 March 2011 19:50, Raymond Hettinger pyt...@rcn.com wrote:
from collections import Counter
from itertools import product
print('\n'.join('*'*(c//2000) for _,c in sorted(Counter(map(sum,
product(range(6), repeat=8))).items(
As a suggestion, you can auto-format your email link so that the email of
the user is sent as part of the URL GET argument.
Cheers,
Xav
On 5 December 2010 08:15, Zeynel azeyn...@gmail.com wrote:
Hello,
I am working with Google App Engine python version. The app sends an
email to the user
Also try Pyglet, in combination of PyOpenGL.
Cheers,
Xav
On 17 November 2010 04:36, Marc-Andre Belzile
marc-andre.belz...@autodesk.com wrote:
Hi list,
could someone recommend a good python ogl package (open source is
preferred) ? I found these ones so far:
Hey all,
Apologies if I am posting this in the wrong list. Does anyone know of a good
compiler for javadoc comment style into reStructuredText, for Sphinx to
chew?
Cheers,
Xavier
--
http://mail.python.org/mailman/listinfo/python-list
Gmail.
-Xav
On 3 November 2010 18:02, John Bond li...@asd-group.com wrote:
Hope this isn't too O/T - I was just wondering how people read/send to this
mailing list, eg. normal email client, gmane, some other software or online
service?
My normal inbox is getting unmanageable, and I think
On 29 October 2010 15:50, Paul Rubin no.em...@nospam.invalid wrote:
John Nagle na...@animats.com writes:
d1 = set('monday','tuesday')
days_off = set('saturday','sunday')
if not d1.isdisjoint(days_off) :...
This is cheaper than intersection, since it doesn't have to
allocate
Not sure why you use the for-else syntax without a break or continue. And
I'm also not sure on the readability.
-Xav on his Froyo
On 29/10/2010 6:21 PM, HEK elkar...@gmail.com wrote:
On Oct 28, 6:16 pm, cbr...@cbrownsystems.com
cbr...@cbrownsystems.com wrote:
It's clear but tedious to write:
On 27 October 2010 18:27, Arnaud Delobelle arno...@gmail.com wrote:
True. It's far too verbose. I'd go for something like:
f=lambda n:n=0 or n*f(~-n)
I've saved a few precious keystrokes and used the very handy ~- idiom!
Huh, I've never seen that one before. Seems to work on both
On 28 October 2010 20:24, Alex sigma.z.1...@gmail.com wrote:
hi there, I keep getting the message in the Topic field above.
Here's my code:
self.click2=Button(root,text=Click Me).grid(column=4,row=10)
self.click2.bind(Button-1,self.pop2pop)
what am I doing wrong?
Try
On 28 October 2010 23:52, Dave Angel da...@ieee.org wrote:
The ~- trick only works on two's complement numbers. I've worked on
machines in the past that used one's complement, and this wouldn't work
there.
DaveA
I imagine this wouldn't work on floating point numbers either.
Cheers,
Xav
On 29 October 2010 00:13, Dave Angel da...@ieee.org wrote:
From the help:
The unary ~ (invert) operator yields the bitwise inversion of its plain or
long integer argument. The bitwise inversion of x is defined as -(x+1). It
only applies to integral numbers
Inverting the bits of a floating
On 29 October 2010 14:41, Bj Raz whitequill...@gmail.com wrote:
Since Python can't call functions, I would like to know if there is a work
around.
Python can't call functions? I'm sorry, but I may have misunderstood what
you are trying to say.
I'm not familiar with the mathematical
On 20 September 2010 15:46, Jordan Blanton jeblan...@crimson.ua.edu wrote:
I am in a computer science class in which I am supposed to be creating a
program involving a sine wave and some other functions. I understand the
concept of the problem, but I don't understand any of the lingo being
On 20 September 2010 16:25, Jordan Blanton jeblan...@crimson.ua.edu wrote:
its not specific terms that i dont understand. its general directions. but
when i dont understand one or two key points in a sentence, its hard to
understand what the directions are telling me to do.
Is it possible
On 20 September 2010 16:38, Jordan Blanton jeblan...@crimson.ua.edu wrote:
Honestly, if I knew what was being said, then yes. I posted the directions
to the project and what I've done so far but I have no idea if what I'm
doing is right at all.
Jordan, correct me if I'm mistaken, but you
Thanks Jordan. My reply will be in Blue. I apologise if this ever gets hard
to read, but it's beginning to.
On 20 September 2010 16:51, Jordan Blanton jeblan...@crimson.ua.edu wrote:
And so he started on a module that estimated the length of a sine wave.
Here is what he wrote:
ok. what is a
Okay, it looks like you're doing well. I'm just going through your second
email now, and it seems many of my comments in the first email is irrelavent
to you anymore, because you already knew how to do it. =]
Let's have a look. Again, my reply is in Blue.
.
*And what I've attempted to do so
On 20 September 2010 17:29, Xavier Ho cont...@xavierho.com wrote:
Secondly, that doesn't even compile. Nor does
xDistance=eval(input(Distance to the stop sign (in feet): ))
Just correcting myself here. It compiles, but generates an error when you
give it a number, which still fails.
Cheers
On 20 September 2010 07:59, Ken Watford
kwatford+pyt...@gmail.comkwatford%2bpyt...@gmail.com
wrote:
Not that I disagree with you, but you might find this helpful:
http://tinyurl.com/preview.php
--
http://mail.python.org/mailman/listinfo/python-list
I don't think the OP wants a preview
On 17 September 2010 12:48, Terry Reedy tjre...@udel.edu wrote:
Doubling an escape char, whatever it is, is a common convention:
print(Print a {{}} format string line this: {{{}}}.format(2))
Print a {} format string line this: {2}
Wow. That's convoluted. Took me a minute to process.
On 17 September 2010 01:25, J dreadpiratej...@gmail.com wrote:
Is there a better way to print a '%' in the string when also using
formating?
I believe %% will escape the % and prints it straight out.
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
On 13 September 2010 08:40, Ben Finney
ben+pyt...@benfinney.id.auben%2bpyt...@benfinney.id.au
wrote:
Paul Watson paul.hermeneu...@gmail.com writes:
What is the currently favored installation process for Python
applications?
‘python ./setup.py install’, using the standard library's
On 7 September 2010 10:56, MRAB pyt...@mrabarnett.plus.com wrote:
Incidentally, there's a builtin function called 'input' so using it as
a variable name is a discouraged! :-)
Right-o!
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
On 7 September 2010 22:05, Baba raoul...@gmail.com wrote:
It would be great if someone could give me a brief explanantion of the
mutation concept.
In this case, to mutate is to change. If you must not mutate the list, you
must not change it.
In another words, reading from the list is fine.
On 7 September 2010 10:37, ceycey cuneyt.er...@gmail.com wrote:
I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
'1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
'3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
'9.0601'].
How
On 2 September 2010 00:47, Alban Nona python.k...@gmail.com wrote:
Hello,
So I figure out this night how to create automatically varibales via
vars(), the script seems to work, exept that where it should give me a list
like :
[ELM004_DIF,ELM004_SPC,ELM004_RFL,ELM004_SSS, ELM004_REFR,
On 2 September 2010 01:11, Alban Nona python.k...@gmail.com wrote:
Hello,
seems to have the same error with python.
In fact I was coding within nuke, a 2d compositing software (not the best)
unfortunately, I dont see how I can use dictionnary to do what I would like
to do.
Hello Alban,
On 2 September 2010 02:49, Alban Nona python.k...@gmail.com wrote:
Well what Iam trying to generate is that kind of result:
listn1=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS',
'ELM001_REFR', 'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE',
'ELM001_DPF', 'ELM001_SDW',
2010/9/2 Alban Nona python.k...@gmail.com
Hello Xavier, working great ! thank you very much ! :p
Do you know by any chance if dictionnary can be sorted asthis:
Look at the sorted() global function in the Python API. ;]
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
On 1 September 2010 07:57, Alban Nona python.k...@gmail.com wrote:
listPass = [DIF,SPC, RFL, SSS, REFR, ALB, AMB, NRM, MVE,
DPF, SDW, MAT, WPP]
Out of curiosity, could you briefly mention what SDW and WPP passes are?
I've worked out the rest, and these two are riddling my brain.
(On topic:
On 1 September 2010 12:00, Alban Nona python.k...@gmail.com wrote:
@Xavier: ShaDoW, WorldPositionPoint (which is the same thing as
WordPointCloud passe) :)
Aha! That's what I was missing.
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
Ethan, are you trying to write the constructor in the class statement?
Cheers,
Xav
On 31 August 2010 00:10, Ethan Furman et...@stoneleaf.us wrote:
Good Day!
I am stuck... hopefully a few fresh pairs of eyes will spot what I am
missing.
I have a metaclass, Traits, and two different testing
Actually, scrape what I said.
I think you need to have metaclass in the class statement, not just meta.
-Xav
On 31 August 2010 00:16, Xavier Ho cont...@xavierho.com wrote:
Ethan, are you trying to write the constructor in the class statement?
Cheers,
Xav
On 31 August 2010 00:10, Ethan
One possible reason I can think of -
- exiting this loop means all compared chars were identical hence it
is a palindrome and i return True
is probably incorrect reasoning. Think again.
Also, you may consider posting your code in a way that preserves the
whitespace characters.
Cheers,
Xav
On
On 23 June 2010 00:06, Neil Webster nswebs...@gmail.com wrote:
Hi all,
I've got a simple problem but it's defeated me and I was wondering if
somebody could point out where I'm going wrong or offer an alternative
solution to the problem?
I have a list of lists such as
On 15 June 2010 21:49, superpollo ute...@esempio.net wrote:
goal (from e.c.m.): evaluate
1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three
consecutive + must be followed by two - (^ meaning ** in this context)
Obligatory one-liner:
sum((1, 1, 1, -1, -1)[(x-1) % 5] *
On 15 June 2010 22:55, superpollo ute...@esempio.net wrote:
Peter Otten ha scritto:
superpollo wrote:
goal (from e.c.m.): evaluate
1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three
consecutive + must be followed by two - (^ meaning ** in this context)
from
2010/6/12 yanhua gasf...@163.com
hi,all!
it's a simple question:
input two integers A and B in a line,output A+B?
this is my program:
s = input()
t = s.split()
a = int(t[0])
b = int(t[1])
print(a+b)
but i think it's too complex,can anybody tell to slove it with less code.
--
The
On 1 June 2010 21:48, Leo Breebaart l...@lspace.org wrote:
When fed the following code:
def Foo():
class A(object):
def __init__(self):
pass
class B(object):
def __init__(self):
pass
PyChecker 0.8.18 warns:
foo.py:9: Redefining attribute
On 31 May 2010 20:19, Payal payal-pyt...@scriptkitchen.com wrote:
Hi,
I am trying to learn Python (again) and have some basic doubts which I
hope someone in the list can address. (English is not my first language and
I
have no CS background except I can write decent shell scripts)
Welcome
list(combinations_with_replacement('01',3))
('0', '0', '0')
('0', '0', '1')
('0', '1', '1')
('1', '1', '1')
Is it possible to get combinations_with_replacement to return numbers
rather than strings? (see above)
list(combinations_with_replacement(range(0,2), 3))
[(0, 0, 0), (0, 0, 1),
On 29 May 2010 06:44, Mark Dickinson dicki...@gmail.com wrote:
But I was struck by its beauty and
simplicity, and thought it deserved to be better known.
Wow, that took me at least 2 minutes to see its beauty as well. Nice find,
Mark. Thanks for sharing.
(Also, it's nice to see another SOer
On 29 May 2010 23:24, Astley Le Jasper astley.lejas...@gmail.com wrote:
def createlist():
column_title_list = (
(id,20,integer),
(companyname,50,text),
getproducts(),
# Insert into the list with slicing syntax.
column_title_list[2:3} = getproduct()
Sorry, that should have been [2:3]. Typing a bit too fast.
-Xav
--
http://mail.python.org/mailman/listinfo/python-list
On 27 May 2010 22:22, HH henri...@gmail.com wrote:
if (width == 0 and
height == 0 and
color == 'red' and
emphasis == 'strong' or
highlight 100):
raise ValueError(sorry, you lose)
I've gotta say - I've bumped into this problem before, and I'm sure
On 27 May 2010 22:57, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
One possible solution
if (
width == 0 and
height == 0 and
color == 'red' and
emphasis == 'strong' or
highlight 100
):
raise ValueError(sorry, you
On 27 May 2010 22:57, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
One possible solution
if (
width == 0 and
height == 0 and
color == 'red' and
emphasis == 'strong' or
highlight 100
):
raise ValueError(sorry, you
On 27 May 2010 23:26, Xavier Ho cont...@xavierho.com wrote:
Oh, one minor optimisation. You can put the last condition first
I take that back. You really can't, without using more parans or ifs.
Apologies.
-Xav
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, May 23, 2010 at 3:35 PM, sturlamolden stu...@molden.no wrote:
Yes I know about PyOpenGL, but then there is the speed argument: From
C I can make epeated calls to functions like glVertex4f with minial
loss of efficacy. Calling glVertex4f from Python (e.g. PyOpenGL) would
give me the
On Fri, May 21, 2010 at 9:12 PM, Deep_Feelings doctore...@gmail.com wrote:
thankx for reply.
from that list i have a feeling that python is acting only as quick
and dirty work nothing more !
You might have just offended a lot of people on the list here
Cheers,
Xav
--
On 5/19/2010 1:14 AM, Vincent Davis wrote:
class C(object):
def __init__(self, new):
self.letter = dict(a=1,b=2,c=3, amin=np.amin)
self.new = new
self._x = None
self._Y = None
@property
def x(self):
I'm the 'x' property.
self._x =
Yeah, most unis here commence in March, and the first semester usually
finish in June, when the exams are.
- Xav on his 'droid
On 19/05/2010 2:21 PM, Patrick Maupin pmau...@gmail.com wrote:
On May 14, 3:19 am, harry k hkiri...@yahoo.com.au wrote:
Write a spell checking tool that wil...
Well,
1) Welcome to Python-List!
2) Python-list doesn't like to do other people's homework.
3) What have you tried?
Cheers,
Xav
On Fri, May 14, 2010 at 6:19 PM, harry k hkiri...@yahoo.com.au wrote:
Write a spell checking tool that will identify all misspelled word in a
text file using a provided
On Sat, May 15, 2010 at 9:02 PM, timo verbeek timoverbee...@gmail.comwrote:
I'm planning to create a human word program
snip
I need help with getting the useful information how do I get the place
if I don't now how long the string is?
Boy, that is a very hard problem. Are the inputs
On Sat, May 15, 2010 at 9:12 PM, Xavier Ho cont...@xavierho.com wrote:
You need to have a very, very good set of heruistics and deterministic
functions to do that.
How do I get the position of a known word in a string if the length if
unknown?
And this is what I get for late night e
On Sat, May 15, 2010 at 9:32 PM, timo verbeek timoverbee...@gmail.comwrote:
On May 15, 1:02 pm, timo verbeek timoverbee...@gmail.com wrote:
Place starts always with for
Okay, much better.
Given that constraint, it looks like regular expression can do the job. I'm
not very experienced with
Have I missed something, or wouldn't this work just as well:
list_of_strings = ['2', 'awes', '3465sdg', 'dbsdf', 'asdgas']
[word for word in list_of_strings if word[0] == 'a']
['awes', 'asdgas']
Cheers,
Xav
On Mon, May 10, 2010 at 6:40 PM, Jimbo nill...@yahoo.com wrote:
Hello
I am trying
On Sun, May 9, 2010 at 6:20 PM, gopi krishna dasarathulag...@gmail.comwrote:
Why list comprehension faster than for loop?
Because Python optimises for certain special cases, when the number of
iterations is predicable in a list comprehension.
Cheers,
Xav
--
On Sun, May 9, 2010 at 6:19 PM, gopi krishna dasarathulag...@gmail.comwrote:
Hi
can I change the variable in a function using the function
suppose
def a():
x=20
can we change the variable using the function
Can you give us an example of how you'd like to change the variable, in
code,
On Sun, May 9, 2010 at 7:20 PM, superpollo ute...@esempio.net wrote:
if a b c are digits, solve ab:c=a*c+b
Sorry, what does the notation ab:c mean?
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
You need to ignore empty lines.
for line in open('1.txt'):
if len(line.strip()) == 0:
continue
columns = line.split()
print columns[0], columns[2]
Cheers,
Xav
On Thu, May 6, 2010 at 6:22 PM, mannu jha mannu_0...@rediffmail.com wrote:
Hi,
I have few files like this:
24
On Fri, May 7, 2010 at 11:13 AM, Chris Rebert pyid...@rebertia.com wrote:
On Thu, May 6, 2010 at 5:43 PM, Mathias Panzenböck
grosser.meister.mo...@gmx.net wrote:
Shouldn't by mathematical definition -x // y be the same as -(x // y)?
I think this rather odd. Is there any deeper reason to
On Fri, May 7, 2010 at 12:14 PM, Chris Rebert c...@rebertia.com wrote:
Personally, I find the following the most unintuitive:
divmod(-11, 3) == (-4, 1)
So, we overshoot -11 and then add 1 to go back to the right place?
That violates my intuitive thought that abs((n//d)*d) = abs(n) ought to
On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj richard.lam...@bilcom.atwrote:
Hello,
i want to add functions to an instance of a class at runtime. The added
function should contain a default parameter value. The function name and
function default paramter values should be set dynamical.
Michal,
May I ask why do you care about the object's management? Let Python worry
about that. What's your use case?
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 26, 2010 at 3:19 PM, Chris Rebert c...@rebertia.com wrote:
Apparently either you and the General Decimal Arithmetic spec differ
on what constitutes engineering notation, there's a bug in the Python
decimal library, or you're hitting some obscure part of the spec's
definition. I
On Mon, Apr 26, 2010 at 3:39 PM, Chris Rebert c...@rebertia.com wrote:
The conversion **exactly follows the rules for conversion to
scientific numeric string** except in the case of finite numbers
**where exponential notation is used.**
Well, then maybe the conversion doesn't exactly follow
On Fri, Apr 23, 2010 at 12:04 AM, Tim Golden m...@timgolden.me.uk wrote:
Assuming top-k doesn't mean something obscurely statistical:
l = [1,2, 3, 4, 5]
k = 3
print (sorted (l, reverse=True)[:k])
You don't really need to reverse sort there:
numbers = [1, 4, 5, 3, 7, 8]
On Fri, Apr 23, 2010 at 12:23 AM, D'Arcy J.M. Cain da...@druid.net wrote:
Now try returning the top two or four numbers.
numbers = [1, 4, 5, 3, 7, 8]
sorted(numbers)[-2:]
[7, 8]
sorted(numbers)[-4:]
[4, 5, 7, 8]
I see what you mean. This is not as intuitive, is it?
Cheers,
Xav
--
On Wed, Apr 21, 2010 at 7:59 AM, Alan Harris-Reid
aharrisr...@googlemail.com wrote:
The code is not usually in class.__init__ (otherwise I would have used the
self. prefix)
Alan, if your variables are not usually in __init__, what's preventing you
from using class variables like this:
On Tue, Apr 20, 2010 at 7:21 AM, Robert Somerville
rsomervi...@sjgeophysics.com wrote:
class ctest():
x = int
y = [1,2,3]
Variables defined directly under the class are known as static variables
in many other languages. Here in Python it's called a class variable, but
they're still the
On Tue, Apr 20, 2010 at 7:38 AM, Chris Rebert c...@rebertia.com wrote:
Additionally, `self.x = int` might not do what you thought it does. It
does *not* create a new instance variable of type 'int'. Instead, it
literally assigns to a new instance variable x the *function*† that
converts
)):
^
SyntaxError: invalid syntax
What was the rationale behind this design?
Cheers,
Ching-Yun Xavier Ho, Technical Artist
Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: cont...@xavierho.com
Website: http://xavierho.com/
--
http://mail.python.org/mailman/listinfo/python
On Mon, Apr 19, 2010 at 9:46 AM, Chris Rebert c...@rebertia.com wrote:
It doesn't really make sense to use * in such situations anyway, you
can just do the normal `z = (1,2,3)`
But calling function(1.0, (0.0, 1.0, 0.0)) has been a big pet peeve of mine,
and it looks extremely ugly and, imo,
On Sat, Apr 17, 2010 at 11:09 PM, vsoler vicente.so...@gmail.com wrote:
I have the following script:
class TTT(object):
def duplica(self):
self.data *= 2
def __init__(self, data):
self.data = data
TTT.duplica(self.data)
You're calling duplica with the class,
Hi Alex,
It's because Python 3.x introduced a lot of backwards incompatibilities.
Python 2.7 aims to bridge that gap, so many 3rd party libraries that depend
on Python 2.x can transit onto Python 3.x better, as I understand.
Cheers,
Xav
On Mon, Apr 12, 2010 at 12:52 PM, Alex Hall
On Sun, Apr 11, 2010 at 11:40 PM, BJ Swope bigbluesw...@gmail.com wrote:
Other than asking the website owner to change the name of the field
how can I go about passing that field in the form post?
How about:
urllib.urlencode({'pass' : 'foo'})
And so on? What is your problem in this
On Tue, Apr 6, 2010 at 11:39 PM, Albert van der Horst
alb...@spenarnc.xs4all.nl wrote:
Now for floating point numbers the order of summation is crucial,
not commutative (a+b)+c a+(b+c).
Could you shed some light on why is this?
Cheers,
Xav
--
So my question is whether it's bad practice to set things up so each
method operates on self.document or should I pass document around from
one function to the next?
I think this depends on the use case.
If the functions you're calling in between have a chance to be called
independently,
On Wed, Apr 7, 2010 at 1:19 AM, Jean-Michel Pichavant
jeanmic...@sequans.com wrote:
Usually, when using classes as namespace, functions are declared as static
(or as classmethod if required).
e.g.
class Foo:
@classmethod
def process(cls, document):
print 'process of'
Python caches objects for reuse, but I'm not too certain on how it works,
either. Seems a bit odd. I just tested on 2.6.5 and got the same result.
This hasn't been a problem for me, though.
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
Javascript in recent years has been getting better and better, and
now is a way better language than python. So to keep up with the
times pygame has been rewritten for javascript.
*shudders*
Can someone convince me why that is a good idea at all? Any rationales?
Cheers,
-Xav
--
On Fri, Apr 2, 2010 at 6:19 PM, Gary Herron gher...@digipen.edu wrote:
It's a joke -- see
http://en.wikipedia.org/wiki/April_Fools%27_Dahttp://en.wikipedia.org/wiki/April_Fools%27_Day
D'oh!
Can't believe that got me.
(It's already 2nd of April... you're not supposed to make that joke now!
Hi Jebamnana,
You'll probably have to copy the pynotify contents to the Python 3.1 folder.
(under Libs\site-packages). You should be able to find the folder in the
Python 2.6 paths.
Once you do that, you can try to use it. But I don't know if pynotify will
be able to run with Python 3.1. For
On Fri, Apr 2, 2010 at 8:13 PM, Xavier Ho cont...@xavierho.com wrote:
Hi Jebamnana,
Jebagnana*
Sorry.
-Xav
--
http://mail.python.org/mailman/listinfo/python-list
Best I can come up with:
def split_number(string):
... output = [string[0]]
... for character in string[1:]:
... if character.isdigit() != output[-1].isdigit():
... output.append('')
... output[-1] += character
... return tuple(output)
...
On Fri, Apr 2, 2010 at 8:14 PM, A Serious Moment marty.musa...@gmail.comwrote:
SPARSE COMPLETE SETS FOR NP:
SOLUTION OF A CONJECTURE
BY MARTIN MICHAEL MUSATOV *
for llP:
Sparse Comp1ete Sets
Solution of a Conjecture
Hi,
If you're serious about this posting, could you please:
1)
])
... output.append('')
... output[-1] += character
... return tuple(output)
...
split_number('si_pos_99_rep_1_0.ita')
('si_pos_', 99, '_rep_', 1, '_', 0, '.ita')
Cheers,
Xav
On Fri, Apr 2, 2010 at 8:26 PM, Xavier Ho cont...@xavierho.com wrote:
Best I can come up with:
def split_number(string
1 - 100 of 216 matches
Mail list logo