On 07/17/2012 04:24 AM, Lipska the Kat wrote:
...
Thanks for your time and I'll try to do a bit better with the reading thing
before asking more
questions... not sure about this obsession with code indentation though :-|
I think it's inaccurate to call this indentation an obsession, it's part
On 18/07/12 05:12, gaodexiaozh...@gmail.com wrote:
However,there is one project implemented by Python used PyXML and now
my Jython project has to depend on it ,so I am afraid that if Jython
doesn't support PyXML,then my jython project can not depend on the
original Python project ,then my jython
On 18/07/12 01:46, Andrew Cooper wrote:
On 17/07/2012 19:36, Lipska the Kat wrote:
On 17/07/12 19:18, Mark Lawrence wrote:
On 17/07/2012 18:29, Ethan Furman wrote:
Terry Reedy wrote:
On 7/17/2012 10:23 AM, Lipska the Kat wrote:
snip
Take for example a Linux system call handler. The gen
On 17 July 2012 13:01, Lipska the Kat wrote:
> Well I've set myself a task.
> I have a text file containing a list of stock items
> each line contains the number in stock followed by a tab followed by the
> name of the item. I need to implement something that reads in the text file
> and outputs
Hi there,
I've released this morning new versions of Pylint, ASTNG and logilab-common
projects. For more information, read http://www.logilab.org/blogentry/100365
Enjoy!
--
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (09.54.03.55.76)
Formations Python, Debian, Méth. Agiles: htt
Am 18.07.2012 11:06, schrieb Lipska the Kat:
On 18/07/12 01:46, Andrew Cooper wrote:
Take for example a Linux system call handler. The general form looks a
little like (substituting C for python style pseudocode)
if not (you are permitted to do this):
return -EPERM
if not (you've given me
On Tue, 17 Jul 2012 12:01:21 +0100, Lipska the Kat wrote:
> For the past 9 years I have been developing in Java
[...]
> Anyway, I'm looking at Python as a rapid prototyping language. I have an
> idea and just want to get it down in basic outline code as quickly as
> possible before it departs my a
On Tue, 17 Jul 2012 09:52:59 -0400, Roy Smith wrote:
> you could write in Python:
>
> # Type matching will get checked at run-time
> def my_function(mpf, ot):
>assert isinstance(mpf, MassivelyParallelFrobinator)
>assert isinstance(ot, OtherThing)
Keep in mind that assertions are not gu
On Wed, 18 Jul 2012 01:46:31 +0100, Andrew Cooper wrote:
> Take for example a Linux system call handler. The general form looks a
> little like (substituting C for python style pseudocode)
>
> if not (you are permitted to do this):
> return -EPERM
> if not (you've given me some valid data):
In article <5006b2e2$0$29978$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Tue, 17 Jul 2012 09:52:59 -0400, Roy Smith wrote:
>
> > you could write in Python:
> >
> > # Type matching will get checked at run-time
> > def my_function(mpf, ot):
> >assert isinstance(mpf, Mas
On Wed, 18 Jul 2012 09:07:22 -0400, Roy Smith wrote:
>> Keep in mind that assertions are not guaranteed to run. Code like the
>> above is buggy, because if Python is run under the -O (optimize) flag,
>> assertions will be stripped out.
>
> One could equally say that "code like the above is effici
On 2012-07-17, Lipska the Kat wrote:
> and what's this obsession with 'correct' indentation of code ???
If you can explain to us Java's obsession with 'correct' placemnt of
curly-braces, then you've explained indentation in python.
Unless you're asking about the tabs vs. spaces argument. In th
On 2012-07-17, Ethan Furman wrote:
> In Foxpro if you do a
Foxpro?
--
Grant Edwards grant.b.edwardsYow! I am NOT a nut
at
gmail.com
--
http://mail.python.org/mailman/listinfo/p
On 18/07/12 14:05, Steven D'Aprano wrote:
On Wed, 18 Jul 2012 01:46:31 +0100, Andrew Cooper wrote:
Take for example a Linux system call handler. The general form looks a
little like (substituting C for python style pseudocode)
if not (you are permitted to do this):
return -EPERM
if not (
On 18/07/12 15:34, Grant Edwards wrote:
On 2012-07-17, Lipska the Kat wrote:
and what's this obsession with 'correct' indentation of code ???
If you can explain to us Java's obsession with 'correct' placemnt of
curly-braces, then you've explained indentation in python.
I'm not getting into
On 7/18/2012 9:34 AM, Grant Edwards wrote:
> people who us tabs are wrong
Don't make me get my flamethrower!
> and people who mix spaces and tabs -- well, we don't
> talk about them in polite company.
Mixing can make sense, but not in Python.
*hides*
--
CPython 3.3.0b1 | Windows NT 6.1.7601.1780
On Thu, Jul 19, 2012 at 12:40 AM, Lipska the Kat
wrote:
> Python looks like an interesting language and I will certainly spend time
> getting to know it but at the moment it seems to me that calling it an
> Object Oriented language is just plain misleading.
Python isn't object oriented in the way
On Thu, Jul 19, 2012 at 12:48 AM, Lipska the Kat
wrote:
> hmm, I've been using tabs ... still, why use one key press when you can use
> 4 ;-). Actually I quite like this aspect of Python, it's rapidly growing on
> me. Wonder if I could introduce this in a future release of Java ... nah,
> I'd be
Lipska the Kat wrote:
On 18/07/12 14:05, Steven D'Aprano wrote:
Even with a break, why bother continuing through the body of the function
when you already have the result? When your calculation is done, it's
done, just return for goodness sake. You wouldn't write a search that
keeps going after
On 18/07/12 16:09, Chris Angelico wrote:
On Thu, Jul 19, 2012 at 12:48 AM, Lipska the Kat
wrote:
hmm, I've been using tabs ...
snip
We must meet half way, you know.
Seems reasonable to me, I'll let you suggest it ;-)
As to tab vs spaces: I'm a fan of tabs, myself. There was an argument
On 18/07/12 16:32, Ethan Furman wrote:
Lipska the Kat wrote:
On 18/07/12 14:05, Steven D'Aprano wrote:
Even with a break, why bother continuing through the body of the
function
when you already have the result? When your calculation is done, it's
done, just return for goodness sake. You wouldn'
On 07/18/2012 08:58 AM, Steven D'Aprano wrote:
>
>
>
> 2) To check your internal reasoning in a function or method.
>
> For example:
>
> def foo(something):
> n = len(something)
> x = math.sqrt(x)
> # We expect that x must be less than half of n.
> # E.g. n=100 gives 10 < 50, whic
On Jul 17, 2012, at 5:57 PM, Ethan Furman wrote:
> In Foxpro if you do a
>
> GOTO 7
>
> with deleted off and record 7 is deleted, the record pointer doesn't
> move (at least in version 6).
>
> I don't like that.
>
> I see four other options:
>
> 0) don't move the pointer (listed for completen
Ed Leafe wrote:
On Jul 17, 2012, at 5:57 PM, Ethan Furman wrote:
In Foxpro if you do a
GOTO 7
with deleted off and record 7 is deleted, the record pointer doesn't
move (at least in version 6).
I don't like that.
I see four other options:
0) don't move the pointer (listed for completeness)
On Jul 18, 2012, at 12:16 PM, Ethan Furman wrote:
> Your memory is good! I typed it in wrong.
Well, I was an MVP for Visual Foxpro for 10 years, so...
;-)
> I see four other options:
>
> 0) don't move the pointer (listed for completeness)
> 1) go to that record anyway
> 2) go
On 18/07/2012 18:28, Ed Leafe wrote:
On Jul 18, 2012, at 12:16 PM, Ethan Furman wrote:
Your memory is good! I typed it in wrong.
Well, I was an MVP for Visual Foxpro for 10 years, so...
;-)
I see four other options:
0) don't move the pointer (listed for completeness)
1) g
On Jul 18, 2012, at 12:57 PM, MRAB wrote:
>> #4 is probably the most Pythonic approach. The calling code can then
>> decide how to react to attempting to access a deleted record. Even if you're
>> accessing data stored in VFP tables, your module should be as Pythonic as
>> possible.
>>
>
7 Aralık 1994 Çarşamba 05:04:22 UTC+2 tarihinde Nick Seidenman yazdı:
> Just for fun I sat down and started writing a forth interpreter in
> python. I got as far as putting in control structs and decided I';d
> better get back to my real job. It does make a nice little example of
> many of the co
I have an interesting problem I'm trying to solve. I have a solution
almost working, but it's super ugly, and know there has to be a
better, cleaner way to do it.
I have a list of path names that have this form:
/dir0/dir1/dir2/dir3/dir4/dir5/dir6/file
I need to find all the file names (basename
On Wed, Jul 18, 2012 at 4:05 PM, wrote:
> 7 Aralık 1994 Çarşamba 05:04:22 UTC+2 tarihinde Nick Seidenman yazdı:
You realize that you're replying to a post from 1994? This code was
written for Python 1.0. I'll be pretty impressed if it still works in
2.7.
> Thank you for the code. How can i im
"larry.mart...@gmail.com" writes:
> I have an interesting problem I'm trying to solve. I have a solution
> almost working, but it's super ugly, and know there has to be a
> better, cleaner way to do it. ...
>
> My solution involves multiple maps and multiple iterations through the
> data. How woul
I'm trying to do something rather tricky, in which a program imports a
module that starts a thread that exec's a (possibly altered) copy of
the source in the original program, and the module doesn't return.
This has to do with an attempt to run VPython in the Mac Cocoa
context, in which Cocoa is re
On 18/07/2012 23:43, Ian Kelly wrote:
On Wed, Jul 18, 2012 at 4:05 PM, wrote:
7 Aralık 1994 Çarşamba 05:04:22 UTC+2 tarihinde Nick Seidenman yazdı:
You realize that you're replying to a post from 1994? This code was
written for Python 1.0. I'll be pretty impressed if it still works in
2.7.
On Tuesday, July 17, 2012 8:55:21 AM UTC-5, Sarbjit singh wrote:
> I am having a problem configuring a listbox widget such that the selection
> remains highlighted even while it is set (programmatically) to the DISABLED
> state. Below code shows the problem:
>
> from Tkinter import *
> master =
On 19/07/12 08:20, larry.mart...@gmail.com wrote:
I have an interesting problem I'm trying to solve. I have a solution
almost working, but it's super ugly, and know there has to be a
better, cleaner way to do it.
I have a list of path names that have this form:
/dir0/dir1/dir2/dir3/dir4/dir5/di
"Lipska the Kat" wrote in message
news:c76dnv778_sw4zvnnz2dnuvz8ukdn...@bt.com...
On 18/07/12 01:46, Andrew Cooper wrote:
if not (you are permitted to do this):
return -EPERM
if not (you've given me some valid data):
return -EFAULT
if not (you've given me some sensible data):
r
On Wed, 18 Jul 2012 15:48:28 +0100, Lipska the Kat wrote:
> On 18/07/12 15:34, Grant Edwards wrote:
>> Unless you're asking about the tabs vs. spaces argument. In that case,
>> people who use 4 spaces per level are 'correct'; people who use a
>> different number of spaces are a bit less correct;
On Wed, 18 Jul 2012 12:33:01 -0400, Dave Angel wrote:
> On 07/18/2012 08:58 AM, Steven D'Aprano wrote:
>>
>> For bonus points, can you see the mistake?
[...]
>>
> There are actually two bugs in that function. One is in the assertion,
> but more importantly, there's a typo earlier. One that wou
On Thu, 19 Jul 2012 01:04:50 +1000, Chris Angelico wrote:
> Python isn't object oriented in the way Java is ("EVERYTHING has to be
> in a class! Look, it's all OO now!").
Actually, Python is more object-oriented than Java. In Python, everything
is an object. We have no distinction between boxed
On 19/07/2012 02:14, Steven D'Aprano wrote:
On Wed, 18 Jul 2012 15:48:28 +0100, Lipska the Kat wrote:
On 18/07/12 15:34, Grant Edwards wrote:
Unless you're asking about the tabs vs. spaces argument. In that case,
people who use 4 spaces per level are 'correct'; people who use a
different nu
On Wed, 18 Jul 2012 15:40:00 +0100, Lipska the Kat wrote:
[...]
>> Even with a break, why bother continuing through the body of the
>> function when you already have the result? When your calculation is
>> done, it's done, just return for goodness sake. You wouldn't write a
>> search that keeps goi
I need to connect to a site/server that's only accessible after logging into
a remote VPN, then scan a directory for a file pattern and then copy those
files. I know how to do the latter using glob, and I think I figured out
how to connect to the VPN using win32ras and got a response that said
On 07/18/2012 09:36 PM, The Coca Cola Kid wrote:
> I need to connect to a site/server that's only accessible after
> logging into a remote VPN, then scan a directory for a file pattern
> and then copy those files. I know how to do the latter using glob,
> and I think I figured out how to connect t
On Thu, Jul 19, 2012 at 11:22 AM, Steven D'Aprano
wrote:
> On Thu, 19 Jul 2012 01:04:50 +1000, Chris Angelico wrote:
>
>> Python isn't object oriented in the way Java is ("EVERYTHING has to be
>> in a class! Look, it's all OO now!").
>
> Actually, Python is more object-oriented than Java. In Pytho
On Jul 18, 2012, at 11:47 PM, Nicky dsdsdsds wrote:
> COPY THIS MESSAGE FAST BECAUSE JEWS AND TRAITORS DELETE IT FAST!
>
>
Sometimes I wish this list was moderated...
-Bill
--
http://mail.python.org/mailman/listinfo/python-list
On 19/07/2012 05:10, William Ray Wing wrote:
On Jul 18, 2012, at 11:47 PM, Nicky dsdsdsds wrote:
COPY THIS MESSAGE FAST BECAUSE JEWS AND TRAITORS DELETE IT FAST!
Sometimes I wish this list was moderated...
-Bill
I do that, unofficially of course :) I routinely flag crap like this on
g
On Jul 19, 6:34 am, Steven D'Aprano wrote:
> On Wed, 18 Jul 2012 15:40:00 +0100, Lipska the Kat wrote:
> > Object Oriented programming is all about encapsulating human concepts in
> > a way that makes sense to human beings. Make no mistake, it is NEVER the
> > case that a software system is writte
On 7/18/2012 10:40 AM, Lipska the Kat wrote:
fact ... and I have never been forced to admit that I don't know what I
wrote six months ago.
That is an explicit objective of Python's design.
Python looks like an interesting language and I will certainly spend
time getting to know it but at the
48 matches
Mail list logo