On 01/17/2014 08:46 AM, Pete Forman wrote:
Chris Angelico ros...@gmail.com writes:
On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:
Slight aside, any chance of changing the subject of this thread, or even
ending the thread completely? Why? Every time I see it I
On 01/19/2014 12:26 AM, Rustom Mody wrote:
On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote:
On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote:
As do these pieces of code:
-- def quux1(x): return str(x+1)
-- def quux2(x): return hex(x+1)[2:]
They do?
-- quux1(2.3)
On 01/19/2014 08:38 AM, Chris Angelico wrote:
On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman et...@stoneleaf.us wrote:
-- def quux1(x): return str(x+1)
-- quux1(2.3)
'3.3'
(Will be) fixed in 3.5 [1] :)
[1] Which is to say, both will raise an exception.
Why would that raise?
Sorry, should
On 01/19/2014 10:41 AM, Chris Angelico wrote:
On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman et...@stoneleaf.us wrote:
The difference I was thinking of is:
%h % 3.14 # this works
vs.
hex(3.14) # this raises
In 3.5 both will raise.
Now you have me *thoroughly* intrigued. It's not %h
On 01/21/2014 10:03 AM, Chris Angelico wrote:
On Wed, Jan 22, 2014 at 4:52 AM, emile wrote:
Ask if that's not clear.
I'm not entirely sure, but I think this might have been meant for
somewhere other than python-list. Welcome to the club.
And it's an elite club, too! Very few members. ;)
On 01/21/2014 08:00 AM, Rustom Mody wrote:
Most people -- even those using spreadsheets -- dont seem to think of
the spreadsheet macro language/VBA as a programming language
Ack, are you trying to put him off programming again?!? ;)
Python us fun and a pleasure to use. VBA is not. (IMNSHO
On 01/22/2014 11:23 AM, Mark Lawrence wrote:
I thought this blog might interest some of you
http://pydanny.com/awesome-slugify-human-readable-url-slugs-from-any-string.html
Thanks!
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On 01/22/2014 04:58 PM, Larry Martell wrote:
I have the need to check for a files existence against a string, but I
need to do case-insensitively.
This should get you going. As it is, it will check the /entire/ string you send in even if it has path parts to it, and
there are probably other
On 01/26/2014 10:42 PM, me wrote:
My point of contention isn't so much about what specific syntax I should
be using as much as it is about being allowed to use a syntax that gives
erroneous results without triggering a syntax violation. If the bare
except: clause is syntactically legal then it
On 01/26/2014 10:46 PM, me wrote:
[...] I'm satisfied that the except: syntax yields
undefined behavior, and in my mind it shouldn't be
syntactically allowed then.
Two points:
1) Python is not C++
2) You asked for help; you received it. Coming back
with an attitude of Python
On 01/26/2014 06:54 PM, Roy Smith wrote:
Chris Angelico wrote:
That said, though, I grew up without syntax highlighting of any sort,
and didn't think it particularly important; but now that I have
editors with all those sorts of features, I do find them handy.
Same here, except I'd replace
On 01/29/2014 01:52 PM, Skip Montanaro wrote:
Following up on my earlier note about UTC v. GMT, I am having some
trouble grokking attempts to convert a datetime into UTC.
Okay, let's see what GMT does for us:
GMT = pytz.timezone(GMT)
u = GMT.normalize(s)
u
datetime.datetime(2014, 1, 29, 21,
On 01/30/2014 10:12 AM, Rotwang wrote:
On 30/01/2014 06:33, Andrew Berg wrote:
On 2014.01.29 23:56, Jessica Ross wrote:
I found something like this in a StackOverflow discussion.
-- def paradox():
... try:
... raise Exception(Exception raised during try)
... except:
...
On 01/30/2014 11:03 AM, Chris Angelico wrote:
On Fri, Jan 31, 2014 at 5:56 AM, Roy Smith wrote:
Yes, that's probably how I would write that, although, this is even simpler:
(x -1) and (y = 5)
Be careful; that's not the same thing.
How so?
--
~Ethan~
--
On 01/31/2014 11:33 AM, Mark Lawrence wrote:
From http://docs.python.org/3/reference/datamodel.html#object.__init__ which
states:-
Called when the instance is created. The arguments are those passed to the
class constructor expression. If a base class
has an __init__() method, the derived
On 01/31/2014 11:52 AM, Ned Batchelder wrote:
On 1/31/14 2:33 PM, Mark Lawrence wrote:
From http://docs.python.org/3/reference/datamodel.html#object.__init__
which states:-
Called when the instance is created. The arguments are those passed to
the class constructor expression. If a base
On 01/31/2014 12:48 PM, MRAB wrote:
On 2014-01-31 19:52, Ned Batchelder wrote:
Why can't we call __init__ the constructor and __new__ the allocator?
The advantage of calling it the initialiser is that it explains why
it's called __init__.
Hm, yes, good point. Also, __init__ initializes so
On 01/31/2014 03:43 PM, Ned Batchelder wrote:
On 1/31/14 6:05 PM, Ben Finney wrote:
Ned Batchelder writes:
I'm not hoping to change any official terminology. I just think that calling
__init__ anything other than a constructor
is confusing pedantry. It is a constructor, and Python
On 01/31/2014 03:47 PM, Ben Finney wrote:
I would prefer it to be clear that “__init__” is called automatically,
*during* the constructor's operation. So, instead of:
Called when the instance is created.
I suggest:
Called automatically by the constructor “__new__” during instance
On 01/31/2014 05:10 PM, Roy Smith wrote:
In article mailman.6233.1391214984.18130.python-l...@python.org,
Ethan Furman et...@stoneleaf.us wrote:
I found calling __init__ the constructor very confusing.
I've heard many people say this, and it's always sort of befuddled me.
I have never
On 01/31/2014 07:16 PM, Terry Reedy wrote:
On 1/31/2014 7:13 PM, Ethan Furman wrote:
On 01/31/2014 03:43 PM, Ned Batchelder wrote:
On 1/31/14 6:05 PM, Ben Finney wrote:
Ned Batchelder writes:
I'm not hoping to change any official terminology. I just think that
calling __init__ anything
On 01/31/2014 06:28 PM, Terry Reedy wrote:
Construct a house:
Clear and grade house site.
Bring in power and water.
Built temporary structures.
Built foundation.
Built house on foundation.
For most classes, __new__ stops with the foundation -- the bare object object
(with the
On 01/31/2014 08:35 PM, Chris Angelico wrote:
On Sat, Feb 1, 2014 at 2:42 PM, Steven D'Aprano wrote:
Thus, two methods. __new__ constructs (creates, allocates) a new object;
__init__ initialises it after the event.
Yes, but if you think in terms of abstractions, they're both just
steps in
On 01/31/2014 09:51 PM, Steven D'Aprano wrote:
On Sat, 01 Feb 2014 15:35:17 +1100, Chris Angelico wrote:
The two methods could have been done as a single method, __construct__,
in which you get passed a cls instead of a self, and you call
self=super().__construct__() and then initialize stuff.
On 02/02/2014 09:12 PM, Roy Smith wrote:
In article mailman.6325.1391403799.18130.python-l...@python.org,
Dave Angel da...@davea.name wrote:
Skip Montanaro s...@pobox.com Wrote in message:
On Sun, Feb 2, 2014 at 9:14 PM, Dave Angel da...@davea.name wrote:
And when the q-bits get
On 02/04/2014 07:45 AM, Steven D'Aprano wrote:
Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?
This is the check-out I'm using:
ethan@media:~/source/python/cpython$ hg parent
On 02/06/2014 12:36 PM, Larry Martell wrote:
On Thu, Feb 6, 2014 at 3:29 PM, Roel Schroeven wrote:
msus...@gmail.com schreef:
While editing this file I accidentally pushed TAB on the line with 'y = z
+ y'.
My suggestion: configure your editor to insert the appropriate amount of
spaces
On 02/07/2014 06:48 PM, Steven D'Aprano wrote:
That is not a trade-off that the core developers have chosen to make,
and I agree with them.
Even though you haven't broken all the build-bots yet, you can still stop saying
them. ;)
--
~Ethan~
--
On 02/09/2014 08:52 AM, Roy Smith wrote:
In article mailman.6584.1391950328.18130.python-l...@python.org,
bagrat lazaryan bagra...@live.com wrote:
pep 257 -- docstring conventions, as well as a myriad of books and other
resources, recommend documenting a function's or method's effect as a
On 02/11/2014 05:05 PM, Chris Angelico wrote:
On Wed, Feb 12, 2014 at 11:34 AM, Travis Griggs wrote:
6) Who writes a function with 19 mandatory arguments anyway
subprocess._execute_child() and distutils.cygwincompiler._execute_child()
Hmm. Those are internal functions (leading
On 02/13/2014 03:50 AM, Ned Batchelder wrote:
On 2/13/14 4:00 AM, Piet van Oostrum wrote:
Ben Finney ben+pyt...@benfinney.id.au writes:
Gregory Ewing greg.ew...@canterbury.ac.nz writes:
Roy Smith wrote:
It looks to me like he's trying to implement a classic Gang of Four
singleton pattern.
On 02/13/2014 09:57 AM, Roy Smith wrote:
In article mailman.6850.1392313443.18130.python-l...@python.org,
Ethan Furman et...@stoneleaf.us wrote:
Say you have a class that represents serial ports or your computer. You
should get the same object every time you ask
for SerialPort(2).
Why
On 02/13/2014 10:37 AM, forman.si...@gmail.com wrote:
I ran across this and I thought there must be a better way of doing it, but
then after further consideration I wasn't so sure.
if key[:1] + key[-1:] == '': ...
Some possibilities that occurred to me:
if key.startswith('') and
On 02/13/2014 11:09 AM, Mark Lawrence wrote:
All I can say is that if you're worried about the speed of a single line of
code like the above then you've got
problems. Having said that, I suspect that using an index to extract a single
character has to be faster than using a
slice, but I
On 02/13/2014 11:20 AM, Ethan Furman wrote:
On 02/13/2014 11:09 AM, Mark Lawrence wrote:
All I can say is that if you're worried about the speed of a single
line of code like the above then you've got problems. Having said
that, I suspect that using an index to extract a single character
has
On 02/13/2014 11:17 AM, Neil Cerutti wrote:
On 2014-02-13, forman.si...@gmail.com forman.si...@gmail.com
wrote:
I ran across this and I thought there must be a better way of
doing it, but then after further consideration I wasn't so
sure.
if key[:1] + key[-1:] == '': ...
Some possibilities
On 02/13/2014 11:43 AM, Peter Otten wrote:
forman.si...@gmail.com wrote:
I ran across this and I thought there must be a better way of doing it,
but then after further consideration I wasn't so sure.
if key[:1] + key[-1:] == '': ...
Some possibilities that occurred to me:
if
On 02/13/2014 01:01 PM, Chris Angelico wrote:
On Fri, Feb 14, 2014 at 7:55 AM, Emile van Sebille em...@fenx.com wrote:
On 2/13/2014 11:59 AM, Zachary Ware wrote:
In a fit of curiosity, I did some timings:
Snip of lots of TMTOWTDT/TIMTOWTDI/whatever... timed examples :)
But I didn't see
On 02/13/2014 02:13 PM, Chris Angelico wrote:
On Fri, Feb 14, 2014 at 8:33 AM, Ethan Furman et...@stoneleaf.us wrote:
Oh, it's not that bad! All you have to do is handle the edge case of an
empty string:
s[::len(s)-1 if s else True]
And the edge case of the one-character string.
Oops, my
On 02/13/2014 01:24 PM, Roy Smith wrote:
Emile van Sebille wrote:
But I didn't see this one:
s[::len(s)-1]
I love it. I need to add this to my list of Python trivia questions.
Great interview question: What does this do? What is its weakness? How would
you fix it?
--
~Ethan~
--
On 02/14/2014 08:10 AM, Sam wrote:
Dynamic data type has pros and cons. It is easier to program but
also easier to create bugs. What are the best practices to reduce
bugs caused by Python's dynamic data-type characteristic? Can the
experienced Python programmers here advise?
Unit tests.
On 02/14/2014 08:54 AM, Marko Rauhamaa wrote:
Here's some advice from a very experienced programmer: become a very
experienced programmer.
+1 QOTW
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
On Wed, 28 Mar 2012 14:28:08 +0200, Ulrich Eckhardt wrote:
Hi!
I'm currently writing some tests for the error handling of some code. In
this scenario, I must make sure that both the correct exception is
raised and that the contained error code is correct:
try:
Steven D'Aprano wrote:
To the degree that the decision of how finely to slice tests is a matter
of personal judgement and/or taste, I was wrong to say that is not the
right way. I should have said that is not how I would do that test.
I believe that a single test is too coarse, and three or
Tim Rowe wrote:
On 22 March 2012 19:14, Chris Angelico ros...@gmail.com wrote:
In any case, though, I agree that there's a lot of people
professionally writing code who would know about the 3-4 that you say.
I'm just not sure that they're any good at coding, even in those few
languages. All
Okay, so I haven't asked a stupid question in a long time and I'm
suffering withdrawal symptoms... ;)
5 % 0 = ?
It seems to me that the answer should be 5: no matter how many times we
add 0 to itself, the remainder of the intermediate step will be 5.
Is there a postulate or by definition
Ethan Furman wrote:
Okay, so I haven't asked a stupid question in a long time and I'm
suffering withdrawal symptoms... ;)
5 % 0 = ?
Thanks for your replies, much appreciated.
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
Ian Kelly wrote:
On Thu, Apr 19, 2012 at 3:33 PM, Terry Reedy tjre...@udel.edu wrote:
On 4/19/2012 1:15 PM, Kiuhnm wrote:
A with statement is not at the module level only if it appears inside a
function definition or a class definition.
This is true, I believe, of all statements.
Am I
Kiuhnm wrote:
I'd like to change the syntax of my module 'codeblocks' to make it more
pythonic.
Current Syntax:
with res func(arg1) 'x, y':
print(x, y)
with res func(arg1) block_name 'x, y':
print(x, y)
New Syntax:
with res == func(arg1) .taking_block (x,
Arnaud Delobelle wrote:
On May 1, 2012 6:42 PM, Jerry Hill wrote:
On Tue, May 1, 2012 at 1:07 PM, Kiuhnm wrote:
If you had read the module's docstring you would know that the public
version uses
Are you aware that you've never posted a link to your module, nor it's
docstrings? Are you also
Every time discussion about __del__ had come up I had thought to myself,
yeah, but I'm being careful to not have reference loops -- /my/ classes
are okay.
and then...
BITE!
But hey, it wasn't a reference loop that got me, it was data being
written back to disk after the disk portion had
Available at http://pypi.python.org/pypi/dbf
Fixed issue with Memo fields not returning correct unicode data.
Updated many docstrings.
Nulls now fully supported.
Getting closer to a 1.0 (non-beta!) release; working on PEP 8
compliance, index files, and actual documentation.
Biggest change
with Dr Sultan Spells of various natures.
Can anybody put a stop to that?
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
Style question:
Since __all__ (if defined) is the public API, if I am using that should
I also still use a leading underscore on my private data/functions/etc?
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
Emile van Sebille wrote:
On 5/11/2012 9:41 AM Ethan Furman said...
Style question:
Since __all__ (if defined) is the public API, if I am using that should
I also still use a leading underscore on my private data/functions/etc?
I would, even if only to alert any future maintainer
Devin Jeanpierre wrote:
On Fri, May 11, 2012 at 11:21 PM, Chris Angelico ros...@gmail.com wrote:
There are times when you want to catch all exceptions, though.
Top-level code will often want to replace exception tracebacks with
error messages appropriate to some external caller, or possibly log
Karl Knechtel wrote:
On Thu, May 10, 2012 at 9:33 AM, Andreas Tawn andreas.t...@ubisoft.com wrote:
And there's also something like...
return \n.join((: .join((str(k), str(self.__dict__[k]))) for k in
self.__dict__))
which is a nice length, but I lose control of the order of the attributes
Just hit a snag:
In cPython the deterministic garbage collection allows me a particular
optimization when retrieving records from a dbf file -- namely, by using
weakrefs I can tell if the record is still in memory and active, and if
so not hit the disk to get the data; with PyPy (and
Ian Kelly wrote:
On Wed, May 16, 2012 at 3:33 PM, Ethan Furman et...@stoneleaf.us wrote:
Just hit a snag:
In cPython the deterministic garbage collection allows me a particular
optimization when retrieving records from a dbf file -- namely, by using
weakrefs I can tell if the record is still
Tim Delaney wrote:
On 17 May 2012 07:33, Ethan Furman wrote:
Just hit a snag:
In cPython the deterministic garbage collection allows me a
particular optimization when retrieving records from a dbf file --
namely, by using weakrefs I can tell if the record is still in
memory and active
Chris Angelico wrote:
On Thu, May 17, 2012 at 9:01 AM, Ethan Furman et...@stoneleaf.us wrote:
A record is an interesting critter -- it is given life either from the user
or from the disk-bound data; its fields can then change, but those changes
are not reflected on disk until .write_record
Michele Simionato wrote:
but I am asking a question instead: should I add this feature to the
next release of the decorator module?
I think it would be an excellent addition to your module.
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Berg wrote:
On 5/24/2012 8:59 PM, Dave Angel wrote:
so I fixed that, and got
inconsistent use of tabs and spaces in indentation
because you mistakenly used tabs for indentation.
Not to start another tabs-vs.-spaces discussion, but tabs are perfectly
legal indentation in Python.
I'm getting towards an actual non-beta release, which means even more
tests, polishings, cleaning up of various things, and actual
documentation. :)
However, I am wondering about my current record API:
Currently, one does things like:
record.scatter_fields()
or
record.has_been_deleted
MRAB wrote:
On 01/06/2012 18:50, Ethan Furman wrote:
I'm getting towards an actual non-beta release, which means even more
tests, polishings, cleaning up of various things, and actual
documentation. :)
However, I am wondering about my current record API:
Currently, one does things like
Tim Chase wrote:
On 06/01/12 19:05, Jon Clements wrote:
On 01/06/12 23:13, Tim Chase wrote:
dbf.scatter_fields
*always* trump and refer to the method.
I did think about *trumping* one way or the other, but both *ugh*.
For the record, it sounded like the OP wanted to be able to use the
Dan Stromberg wrote:
Did the import semantics change in cpython 3.3a4?
I used to be able to import treap.py even though I had a treap directory
in my cwd. With 3.3a4, I have to rename the treap directory to see
treap.py.
Check out PEP 420 -- Implicit Namespace Packages
Eric V. Smith wrote:
On 6/8/2012 6:41 PM, Ethan Furman wrote:
Dan Stromberg wrote:
On Fri, Jun 8, 2012 at 3:16 PM, Ethan Furman wrote:
Dan Stromberg wrote:
Did the import semantics change in cpython 3.3a4?
I used to be able to import treap.py even though I had a treap
directory in my cwd
Julio Sergio wrote:
Jose H. Martinez josehmartinezz at gmail.com writes:
You should define the function first and then call it.
def something(i): return i
a = something(5)
If you want a reference to the function somewhere else you can do this:
I know that. That was what I meant
Julio Sergio wrote:
Ethan Furman ethan at stoneleaf.us writes:
No. The reply from MRAB explains this.
~Ethan~
Thanks, you're right!
I was confusing statemens with declarations.
Yeah, it took me a while to get that straight as well.
~Ethan~
--
http://mail.python.org/mailman/listinfo
Ben Finney wrote:
Curt cu...@free.fr writes:
On 2012-06-16, Christian Heimes li...@cheimes.de wrote:
Actually it's van Rossum, Guido, not Rossum, Guido van. The
van is part of the family name, not a middle name. It's like da
Vinci, Leonardo or von Sydow, Max. On one occasion Guido
complained
Charles Hixson wrote:
On 06/25/2012 12:48 AM, Steven D'Aprano wrote:
Catch any exception is almost certainly the wrong thing to do, almost
always.
This time it was the right thing
No, it wasn't. If you hadn't caught it, Python would have printed it
out for you, along with the full
Ben Finney wrote:
Chris Angelico writes:
梦幻草 wrote:
why can't I send images to python-list@python.org??
It's a text-only list.
I'll take this opportunity to give heartfelt thanks to the
administrators for that policy; please keep this a text-only forum.
+1000
--
Ian Kelly wrote:
def del_b(self, b):
for i, x in enumerate(self.array):
if b is x:
del self.array[i]
break
Nice work, Ian.
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking for some free advice. ;)
My dbf module has three basic containers, all of which support list-like
access: Table, List, and Index, each of which is filled with _DbfRecords.
The fun part is that a _DbfRecord can compare equal to another
_DbfRecord, a _DbfRecordTemplate, a tuple
MRAB wrote:
On 06/07/2012 22:34, Ethan Furman wrote:
I'm looking for some free advice. ;)
My dbf module has three basic containers, all of which support list-like
access: Table, List, and Index, each of which is filled with
_DbfRecords.
The fun part is that a _DbfRecord can compare equal
Devin Jeanpierre wrote:
On Fri, Jul 6, 2012 at 6:46 PM, Ethan Furman et...@stoneleaf.us wrote:
It's checking for equality, not identity.
x = float('nan')
x in [x]
True
It's checking for equality OR identity.
Good point. In my case, checking for equality will cover both cases
Jean-Michel Pichavant wrote:
Why would you want to hire someone that knows something pointless as the
version where feature X has been introduced ?
As an example from today, if someone claimed to have 5+ years of Python
experience, but didn't know that 'with' was standard in 2.6 (or at least
Chris Angelico wrote:
On Wed, Jul 11, 2012 at 2:34 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Of course, if they try to sell themselves as having
five years experience with Python 3.2...
... then they've been borrowing Guido's time machine for personal purposes.
Reminds
Mark Lawrence wrote:
Google tells me that various certifications are available but I'd like
to know if any of these are approved by the PSF or whoever would be
responsible? If there's anything out there I've missed it :-(
There is an O'Reilly Python Certification class offered in
Steven D'Aprano wrote:
On Sun, 15 Jul 2012 10:19:16 -0600, Ian Kelly wrote:
On Sun, Jul 15, 2012 at 4:56 AM, Steven D'Aprano wrote:
(For the record, I can only think of one trap for the unwary: time
objects are false at *exactly* midnight.)
Ugh, that's irritating. I can't think of any
Andrew Berg wrote:
On 7/15/2012 9:38 PM, Steven D'Aprano wrote:
I would expect None to mean doesn't exist or unknown or
something like that - e.g., a value of 0 means 0 jelly beans in the jar
and None means there isn't a jar.
How you interpret some_variable = None depends on what
Andrew Berg wrote:
To put it in duck-typing terms, why should everything have to quack like
True or False? Sure, I can see why 1 quacks like True or [] quacks like
False, but I don't see why say, a Logger or function should quack like
either. Should a Thread object be True if it's been started
Terry Reedy wrote:
On 7/17/2012 10:23 AM, Lipska the Kat wrote:
Well 'type-bondage' is a strange way of thinking about compile time type
checking and making code easier to read (and therefor debug
'type-bondage' is the requirement to restrict function inputs and output
to one declared type,
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:
Well 'type-bondage' is a strange way of thinking about compile time
type
checking and making code easier to read (and therefor debug
'type-bondage
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)
1) go to that record anyway
2) go to the next undeleted record
3)
Ian Kelly wrote:
On Tue, Jul 17, 2012 at 4:57 PM, Ethan Furman et...@stoneleaf.us 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
MRAB wrote:
On 17/07/2012 23:57, 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)
1) go
MRAB wrote:
On 18/07/2012 03:19, Ethan Furman wrote:
MRAB wrote:
On 17/07/2012 23:57, 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
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
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
Getting closer to a stable release.
Latest version has a simpler, cleaner API, and works on PyPy (and
hopefully the other implementations as well ;), as well as CPython.
Get your copy at http://python.org/pypi/dbf.
Bug reports, comments, and kudos welcome! ;)
~Ethan~
--
Steven D'Aprano wrote:
On Fri, 20 Jul 2012 16:59:21 -0700, Ethan Furman wrote:
Getting closer to a stable release.
Excellent! That's fantastic news! I've been waiting for a stable release
of dbf for months! I just have one question.
What is dbf?
:)
dbf (also known as python dbase
Steven D'Aprano wrote:
This mailing list is about helping our fellow Python developers improve
their skills and solve problems. That doesn't just mean *coding*
problems, it also means helping them to write better documentation and
promote their software better.
Indeed it is, and your
Simon Cropper wrote:
Question 1 - What version of VFP will dbf work with? Is VFP9 OK?
As long as you don't use auto-incrementing fields nor varchar fields
you'll be fine.
Question 2 - You statement of compatibility is unclear.
Works with CPython 2.4 - 2.7. (Tested)
Works with PyPy
Chris Angelico wrote:
On Sat, Jul 21, 2012 at 6:02 PM, Ethan Furman et...@stoneleaf.us wrote:
Works with CPython 2.4 - 2.7. (Tested)
Have you considered supporting 3.2/3.3 at all? It's often not
difficult to make your code compatible with both. Or is there some
dependency that is locked to 2
Alex Strickland wrote:
Hi
Getting closer to a stable release.
Latest version has a simpler, cleaner API, and works on PyPy (and
hopefully the other implementations as well ;), as well as CPython.
Get your copy at http://python.org/pypi/dbf.
Bug reports, comments, and kudos welcome! ;)
Ethan Furman wrote:
Alex Strickland wrote:
Not supported: index files:
I have been using http://sourceforge.net/projects/harbour-project/ for
years where a guy called Przemyslaw Czerpak has written an absolutely
bullet proof implementation of NTX and CDX for DBF. Maybe it will
interest you
Chris Angelico wrote:
On Sun, Jul 22, 2012 at 4:15 AM, Ethan Furman et...@stoneleaf.us wrote:
I'll support 3.3+, but not with the same code base: I want to use all the
cool features that 3.3 has! :)
The trouble with double-codebasing is that you have double
maintenance. But sure. So long
Terry Reedy wrote:
Leaving aside the point that this is not directly related to Python, my
opinion is that if the authors will not make past and future papers
freely available, not even an abstract, they should not ask for valuable
free data from freely donated time.
Thanks, Terry! Save me
601 - 700 of 3757 matches
Mail list logo