Jeff Schwab <[EMAIL PROTECTED]> wrote:
> The most traditional, easiest way to open a file in C++ is to use an
> fstream object, so the file is guaranteed to be closed when the fstream
> goes out of scope.
Out of interest, what is the usual way to manage errors that the
operating system reports
Jeff Schwab <[EMAIL PROTECTED]> wrote:
>Matthew Woodcraft wrote:
>> Jeff Schwab <[EMAIL PROTECTED]> wrote:
>>> The most traditional, easiest way to open a file in C++ is to use an
>>> fstream object, so the file is guaranteed to be closed when the fstr
Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Matthew Woodcraft wrote:
>> I see. Then, unless you don't care about data loss passing silently,
>> this 'most traditional' way to open a file is unsuitable for files
>> opened for writing.
> No, why would yo
Nicola Musatti <[EMAIL PROTECTED]> wrote:
> Sebastian Kaliszewski <[EMAIL PROTECTED]> wrote:
>> 3. You can't handle clean-up errors in reasonable way in C++ish approach, so
>> anything more complex should not by handled that way anyway.
> So it's okay for a Python mechanism to deal with 95% of th
<[EMAIL PROTECTED]> wrote:
> I'd be grateful for help with a problem of package and module=20
> namespaces. The behaviour I observe is unexpected (to me), and I=20
> couldn't find the answer in the docs, the tutorial, or the mailing=20
> list archive. So here we go:
> I have a package named 'pack'
<[EMAIL PROTECTED]> wrote:
> Why is """ the preferred delimiter for multi-line strings?
One advantage is that a dumb syntax highlighter is more likely to cope
well if the content includes an apostrophe.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
gideon <[EMAIL PROTECTED]> wrote:
> In the context of a master's thesis I'm currently looking into
> Python's operational semantics. Even after extensive searching on the
> web, I have not found any formal model of Python. Therefore I am
> considering to write one myself. To make a more informed d
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>On Wed, 05 Mar 2008 19:19:08 +, Matthew Woodcraft wrote:
>> One advantage is that a dumb syntax highlighter is more likely to cope
>> well if the content includes an apostrophe.
> But if the content contains double-
In article <[EMAIL PROTECTED]>,
Duncan Booth <[EMAIL PROTECTED]> wrote:
> I don't have a copy of 1.4 to check so I'll believe you, but you can
> certainly get the output I asked for with much more recent versions.
> For the answer I actually want each asterisk substitutes for exactly one
> char
bout two more betas before we start pushing out release
> candidates, hopefully in February.
>
> This is a beta release so be careful.
Congrats, I'm watching with eager anticipation! I'm stunned at how
well this is working and the progress you're making. Keep up the great
wor
Steve Holden writes:
> Unknown wrote:
>> On 2009-01-12, John Machin wrote:
>>
>>> I didn't think your question was stupid. Stupid was (a) CP/M recording
>>> file size as number of 128-byte sectors, forcing the use of an in-band
>>> EOF marker for text files (b) MS continuing to regard Ctrl-Z as
i am trying to access elements of a tuple without using the [1:5] notation.
the contents of the tuple are as follows:
('--datasourcename', 'DB')
I want to access everything in the second argument, but i am not sure
how to go about this without converting to a string.
thanks in advance
--
http://m
e list directly using an index?
right now I would have to grab the tuple and the use the index of the tuple
On Fri, Jan 30, 2009 at 2:20 PM, Matthew Sacks wrote:
> i am trying to access elements of a tuple without using the [1:5] notation.
> the contents of the tuple are as follows:
> (&
>First of all, list is a reserved word. Don't use it as a variable name.
I was using it as an example in this case.
>mylist[0][1] if I understand the question.
This works. Thank you.
On Fri, Jan 30, 2009 at 2:39 PM, Tim Chase
wrote:
>> let me re-phrase that question:
>> i would like to access t
i am trying to figure out what has gone wrong in my python program. it
is complaining that there is an indendation error. should be simple
enough but im stuck on this one. if anyone can help unjolt me it would
be appreciated.
thank you
error message:
Traceback (most recent call last):
File ""
this works.
thanks!
On Fri, Jan 30, 2009 at 3:59 PM, Jervis Whitley wrote:
>
>
>>
>>
>>
>>
>> error message:
>> Traceback (most recent call last):
>> File "", line 1, in
>> IndentationError: expected an indented block (, line 39)
>>
>> code:
>> http://pastebin.com/f2f971f91
>
> Hi,
>
> It looks
Wingware IDE is pretty good. It's not free though.
http://www.wingware.com/
On Sun, Feb 1, 2009 at 12:14 AM, Stephen Hansen wrote:
> On Sat, Jan 31, 2009 at 11:42 PM, mcheun...@hotmail.com
> wrote:
>>
>> Hi all
>> what IDE is the best to write python?
>> thanks
>> from Peter (mcheun...@hotmail
have a loo at the django framework
http://www.djangoproject.com/
On Fri, Feb 6, 2009 at 8:16 PM, Vincent Davis wrote:
> I have a simple script that takes a few input values and returns a csv file
> and a few stats. If I wanted to host this on the web how would I. I have no
> idea where to begin.
Hi List,
I am getting an index out of range error when trying to parse with getopt.
Probably something simple. Any suggestions are appreciated
optlist, args = getopt.getopt(sys.argv[1:], 'h', ['connectPassword=',
'adminServerURL=', 'action=', 'targets=', 'appDir='])
#Assign Opts
connectPassword
does anyone have any arguments against optparse vs getopt
--
http://mail.python.org/mailman/listinfo/python-list
it seems as if optparse isn't in my standard library.
is there a way to add a lib like ruby gems?
On Tue, Feb 10, 2009 at 1:38 PM, Tim Chase
wrote:
> Matthew Sacks wrote:
>>
>> does anyone have any arguments against optparse vs getopt
>
> I've found that the
:42, Matthew Sacks wrote:
>>
>> it seems as if optparse isn't in my standard library.
>
> How did you install your Python? It has been part of the standard library
> for a very long time.
>
>> is there a way to add a lib like ruby gems?
>
> http://docs.python.or
if anyone can have a look at this code and offer suggestions i would
appreciate it.
i am forced to use getopt, so i cant use something good like optparse
passedArgs = sys.argv[1:]
optlist, args = getopt.getopt(str(passedArgs), ["connectPassword=",
"adminServerURL=", "action=", "targets=", "appDir=
The documentation leaves lack for want, especially the examples.
On Tue, Feb 10, 2009 at 5:25 PM, John Machin wrote:
> On Feb 11, 12:12 pm, Matthew Sacks wrote:
>> if anyone can have a look at this code and offer suggestions i would
>> appreciate it.
>> i am forced to use
sults.
I appreciate the response.
M
On Tue, Feb 10, 2009 at 10:36 PM, John Machin wrote:
> On Feb 11, 4:36 pm, Matthew Sacks wrote:
>> The documentation leaves lack for want, especially the examples.
>
> You had two problems:
>
> (1) str(passedArgs): The docs make it plain
>because the traceback says the index is 0 and there's only one line with a 0
>in it!
Indeed. Thank you.
On Wed, Feb 11, 2009 at 7:11 AM, MRAB wrote:
> Steve Holden wrote:
>>
>> Matthew Sacks wrote:
>>>
>>> Hi List,
>>> I am getting
Perhaps you can give me a call privately and I will explain it to you.
Regards,
Matthew
On Wed, Feb 11, 2009 at 1:48 PM, John Machin wrote:
> On Feb 11, 6:16 am, Matthew Sacks wrote:
>> Hi List,
>> I am getting an index out of range error when trying to parse with getopt.
>&g
Keep your threadiquette to yourself.
On Wed, Feb 11, 2009 at 1:48 PM, John Machin wrote:
> On Feb 11, 6:16 am, Matthew Sacks wrote:
>> Hi List,
>> I am getting an index out of range error when trying to parse with getopt.
>> Probably something simple. Any sugges
Ron Garret writes:
> Put this another way: I would have thought that when the Python parser
> parses "u'\xb5'" it would produce the same result as calling
> unicode('\xb5'), but it doesn't. Instead it seems to produce the same
> result as calling unicode('\xb5', 'latin-1'). But my default encoding
"Hendrik van Rooyen" writes:
> "Christian Heimes" wrote:
> on the surface JN has a point - If you have to go through two
> conversions, then 2.6 does not achieve what it appears to set out to
> do. So the issue is simple:
> - do you have to convert twice?
> - If yes - why? - as he says - there
d I will gladly discuss the opportunity in more
detail.
Many thanks,
Matt
Matthew Hyatt
Senior Consultant
<http://www.ajilon.com/>
Tel: +44 (0) 117 930 8575
Fax: +44 (0) 117 929 1444
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
www.computerpeople.com
Int
ee, for each data_type, I call the
corresponding class method that I've specified. Please help me to
transform my ugly functional code into concise functional code. :)
Thanks,
Matthew
--
def parse(self, data, data_type):
if data_type == 'nocall':
Each type does contain its own parsing method. It's just that, as it
stands, one method is being used to shunt off the data to the correct
parsing method.
Matthew Dubins
David Stanek wrote:
On Thu, Dec 25, 2008 at 1:22 PM, Matthew Dubins
wrote:
Hello all,
I have made a python s
I suspect the solution to my problem is something really trivial.
I wrote a module called pitz that contains a class Issue:
>>> pitz.Issue.yaml_tag
u'ditz.rubyforge.org,2008-03-06/issue'
Then I try to load a document with that same tag, but I get a
ConstructorError:
ConstructorError
I started with a module with a bunch of classes that represent database
tables. A lot of these classes have methods that use other classes
inside, sort of like this:
class C(object):
@classmethod
def c1(cls, a):
return a
class D(object):
def d1(self, a
On Fri 17 Oct 2008 04:52:47 PM EDT, Steve Holden wrote:
> Matthew Wilson wrote:
>> I started with a module with a bunch of classes that represent database
>> tables. A lot of these classes have methods that use other classes
>> inside, sort of like this:
>
I want to write some middleware to notice when the inner app returns a
500 status code. I'm sure there are already sophisticated loggers that
do this sort of thing, but I'm using this as a learning exercise.
Right now, I wrapped the start_response callable. So when the WSGI
application calls the
Steve Holden wrote:
Mohsen Akbari wrote:
Dear guys,
I'm a newbie in python and I have this problem with the code that I'm
writing. There is a very long line which I wish to output it to a text
file.But when I do this, in the output file, the result appears in two
lines. I thought maybe that's b
Gary Herron writes:
> But now you are not listening to what people are telling you. It has
> *nothing* to do with the mutability/immutability of the integer and the list
> your two classes create.
No! Did you run the code he posted? The immutability makes all the
difference.
> The difference
Gary Herron writes:
> Gary Herron wrote:
> No, you are still misinterpreting your results. But you can be forgiven
> because this is quite a subtle point about Python's attribute access.
>
> Here's how it works:
>
> On access, self.count (or self.anything) attempts to find "count" in
> the inst
"Rhodri James" writes:
> On Sun, 15 Mar 2009 13:26:17 -, Matthew Woodcraft
>> It seems clear to me that Maxim understood all this when he asked his
>> original question (you need to understand this subtlety to know why
>> the trick he was asking about
John Posner writes:
> My question is ... WHY does the interpreter silently create the
> instance attribute at this point, causing a "surprising decoupling"
> from the class attribute? WHY doesn't the interpreter behave as it
> would with a simple, non-instance variable:
> > python
> Python 2
"Rhodri James" writes:
> But do you, though? The only occasion I can think of that I'd want
> the search to go past the instance is this "auto-initialisation",
> and frankly I'd rather do that in an __init__ anyway. Perhaps
> static methods or class methods work that way, I don't know how
> the
Jim Garrison writes:
> buf = f.read(1)
> while len(buf) > 0
> # do something
> buf = f.read(1)
I think it's more usual to use a 'break' rather than duplicate the read.
That is, something more like
while True:
buf = f.read(1)
I want to have .foo directory that contains some python code. I can't
figure out how to import code from that .foo directory. Is this even
possible?
TIA
Matt
--
http://mail.python.org/mailman/listinfo/python-list
I'm working on a package that includes some files that are meant to be
copied and edited by people using the package.
My project is named "pitz" and it is a bugtracker. Instead of using a
config file to set the options for a project, I want to use python
files.
When somebody installs pitz, I wan
Chris Green wrote:
> Currently I run mutt on a remote server where I have to use maildir
> because their file systems are mounted noatime. I am moving to reading
> mail on my own Linux box just because I want to get back to mbox, [...]
For what it's worth, setting 'check_mbox_size = yes' is usuall
Is there already a tool in the standard library to let me walk up from a
subdirectory to the top of my file system?
In other words, I'm looking for something like:
>>> for x in walkup('/home/matt/projects'):
... print(x)
/home/matt/projects
/home/matt
/home
/
I know I
On Sun 03 May 2009 09:24:59 PM EDT, Ben Finney wrote:
> Not every simple function belongs in the standard library :-)
Thanks for the help with this! Maybe I'm overestimating how often
people need this walkup function.
Matt
--
http://mail.python.org/mailman/listinfo/python-list
I'm writing a command-line application and I want to search through lots
of text files for a string. Instead of writing the python code to do
this, I want to use grep.
This is the command I want to run:
$ grep -l foo dir
In other words, I want to list all files in the directory dir that
contain
On Thu 07 May 2009 09:09:53 AM EDT, Diez B. Roggisch wrote:
> Matthew Wilson wrote:
>>
>> As of May 2009, what is the recommended way to run an external process
>> like grep and capture STDOUT and the error code?
>
> subprocess. Which becomes pretty clear when readi
On Thu 07 May 2009 09:25:52 AM EDT, Tim Chase wrote:
> While it doesn't use grep or external processes, I'd just do it
> in pure Python:
Thanks for the code!
I'm reluctant to take that approach for a few reasons:
1. Writing tests for that code seems like a fairly large amount of work.
I think I
I'm working on a really simple workflow for my bug tracker. I want
filed bugs to start in an UNSTARTED status. From there, they can go to
STARTED.
>From STARTED, bugs can go to FINISHED or ABANDONED.
I know I can easily hard-code this stuff into some if-clauses, but I
expect to need to add a lo
On Sun 24 May 2009 03:42:01 PM EDT, Kay Schluehr wrote:
>
> General answer: you can encode finite state machines as grammars.
> States as non-terminals and transition labels as terminals:
>
> UNSTARTED: 'start' STARTED
> STARTED: 'ok' FINISHED | 'cancel' ABANDONED
> ABANDONED: 'done'
> FINISHED: 'd
I use a @property decorator to turn some methods on a class into
properties. I want to be able to access some of the attributes of the
original funtion, but I don't know how to get to it.
Any ideas?
Matt
--
http://mail.python.org/mailman/listinfo/python-list
I'm using a homemade script to verify some code samples in my
documentation. Here it is:
#! /usr/bin/env python2.6
# vim: set expandtab ts=4 sw=4 filetype=python:
import doctest, os, sys
def main(s):
"Run doctest.testfile(s, None)"
return doctest.testfile(s, No
I have been experimenting with metaclasses lately. It seems possible to
define a metaclass by either subclassing type and then either redefining
__init__ or __new__.
Here's the signature for __init__:
def __init__(cls, name, bases, d):
and here's __new__:
def __new__(meta, classname,
John Salerno <[EMAIL PROTECTED]> wrote:
> Just something that crosses my mind every time I delve into "Learning
> Python" each night. Does anyone see any value in learning Python when you
> don't need to for school, work, or any other reason? I mean, sure, there's
> value in learning anything at
Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> I would like to write a similar problem without this non-programming
> distracting issues (that is, a problem simple enough to be answered in a
> few minutes, that requires only programming skills to be solved, and
> leaving out any domain-specif
I V <[EMAIL PROTECTED]> wrote:
> I hadn't heard of operator.truth before. Does it do anything different
> from bool(x) ?
Not really. It was occasionally useful before the bool type existed;
now it's just a leftover.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> So I have a python program that runs a bunch of other programsit
> then loops forever, occasionally executing other programs.
>
> To run each of these programs my python code executes:
> subprocess.Popen(command_line, shell=True, stdout=fd,
> stder
<[EMAIL PROTECTED]> wrote:
> So it seems like you're designing a language for non-programmers.
> That's good, I've never heard about anyone so interested in teaching
> programming for kids and non-programmers. But in that case, you
> shouldn't even be comparing it to Python.
At one time, Guido was
On May 23, 2:14 am, cm_gui <[EMAIL PROTECTED]> wrote:
> I've yet to see a web application written in Python which is really
> fast.
Then stop looking at your own inept Python code and open your eyes.
--
http://mail.python.org/mailman/listinfo/python-list
On May 23, 9:10 am, [EMAIL PROTECTED] wrote:
> but search and match only returns matchobjects(what are those anyway?
> i dont get what to do with them, do they contain true/false,
> stringposition etc?)
It's all covered in the docs:
http://docs.python.org/lib/module-re.html
http://docs.python.org
On May 23, 4:01 am, "inhahe" <[EMAIL PROTECTED]> wrote:
> Might have a stack overflow issue, if it retries too many times?
In which example? Neither of them is looping...
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno <[EMAIL PROTECTED]> wrote:
> Basically, the question is this: can you write the logic behind a
> program (whether it be a game, an email client, a text editor, etc.)
> without having any idea of how you will implement the GUI?
You probably could, but it's best not to unless you're
David C. Ullrich <[EMAIL PROTECTED]> wrote:
> Matthew Woodcraft <[EMAIL PROTECTED]> wrote:
>> For example, if you were writing the 'logic' for a chess program you
>> might choose a way of modelling the board that can't represent a
>> position with
Michael L Torrie <[EMAIL PROTECTED]> wrote:
> Watch your programmers then. They do have to write and debug the
> code. And they will spend at least as much or more time debugging as
> writing the code. It's a fact. I have several programmers working
> for me on several projects. What you have
Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>Sebastian 'lunar' Wiesner schrieb:
>> I guess, Apache does some kind of memory caching for files, which are often
>> requested and small enough to fit into the system memory. May be, that's
>> what the OP is referring to ...
> I'm not aware of that, an
Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>I don't see this as something that can be solved by ordering tests -
>*especially* not on a per-method-level as the OP suggested, because I
>tend to have test suites that span several files.
unittest already runs multiple test suites in the order you
David <[EMAIL PROTECTED]> wrote:
> Might be a difference in project size/complexity then, rather than
> company size. Most of my works projects are fairly small (a few
> thousand lines each), very modular, and each is usually written and
> maintained by one developer. A lot of the programs will be
I used defaultdict.fromkeys to make a new defaultdict instance, but I
was surprised by behavior:
>>> b = defaultdict.fromkeys(['x', 'y'], list)
>>> b
defaultdict(None, {'y': , 'x': })
>>> b['x']
>>> b['z']
-
In article <[EMAIL PROTECTED]>,
> I tried using the sys.exit() method in my script and passed non -zero
> values. However the value wasn't picked up the by Java
> Process.exitValue() method - it kept picking up 0. On investigation
> it turned out that the exit value being read is from python.exe
>
In article <[EMAIL PROTECTED]>,
> The problem is that using these attributes, I would essentially have
> to re-write the logic python uses when calling a function with a
> given set of arguments. I was hoping there is a way to get at that
> logic without rewriting it.
I don't think there is. I end
Alex Gusarov <[EMAIL PROTECTED]> wrote:
> Hello, I've met a problem - I want my program working without Python
> installation but I have some add-on mechanism (add-ons represented by
> separate .py files, and application auto-recognize such files on
> start).
> So, if I will using py2exe for main
Callie Bertsche wrote:
I have a closely related note. How do I write to a relative path with
python? Example,
source = open('/../../directory/subdirectory/file.extension')
What am I missing?
--
http://mail.python.org/mailman/listinfo/python-list
Leave off the beginning slash.
-Matt
--
http:/
Alexnb wrote:
Okay this is a simple question I just don't know how. If I have a list, say:
funList = []
and after a while something possible should have been appended to it, but
wasn't. How can I test if that list is empty.
if not funList:
do_something()
-Matt
--
http://mail.python.o
Urizev wrote:
Hi everyone
I have developed the singleton implementation. However I have found a
strange behaviour when using from different files. The code is
attached.
Executing main
new MySet object
No singleton instance
New singleton:
<__main__.Singleton instance at 0x2b98be474a70>
new MySet
Ben Finney wrote:
Peter Otten <[EMAIL PROTECTED]> writes:
The problem is the structure of your program. The myset module is
imported twice by Python, once as "myset" and once as "__main__".
Yes, this is the problem. Each module imports the other.
Therefore you get two distinct MySet classes
I'm by no means a testing expert, but I'll take a crack at it.
Casey McGinty wrote:
I'm familiar with the unittest module in Python, however I'm hoping
someone can point me to some examples of more advanced usages of the
framework. For example:
1. Using the framework to test a package with ne
I started off with a module that defined a class Vehicle, and then
subclasses Car and Motorcycle.
In the Car class, for some bizarre reason, I instantiated a Motorcycle.
Please pretend that this can't be avoided for now.
Meanwhile, my Motorcycle class instantiated a Car as well.
Then I moved th
I'm working on a package that uses the standard library logging module
along with a .cfg file.
In my code, I use
logging.config.fileConfig('/home/matt/mypackage/matt.cfg') to load in
the logging config file.
However, it seems really obvious to me that this won't work when I share
this package wit
On Mon 14 Jul 2008 09:25:19 AM EDT, Vinay Sajip wrote:
> Is your package a library or an application? If it's a library, you
> should avoid configuring logging using a config file - this is because
> logging configuration is process-wide, and if multiple libraries use
> fileConfig to configure thei
kj wrote:
> I still don't get it. If we write
>
> y = 'Y'
> x, = y
>
> what's the difference now between x and y? And if there's no
> difference, what's the point of performing such "unpacking"?
If y really is is a string, I think it's likely that the line you came
across was a typo.
In the
Martin P. Hellwig wrote:
I disagree he has upper management written all over him.
In any case, the OP should remember that programming languages are all
theoretically the same: if you can do it in one language, then you can
theoretically do it any other. When choosing a language, you just ne
mefyl wrote:
Uwe Schmitt wrote:
On 12 Jul., 09:08, George Oliver <[EMAIL PROTECTED]> wrote:
What I would like to do is take a program and embed it or put it
within a Python-run GUI, using the GUI just to capture and send input
to the application, and display the ouput.
Which interface does you
Roy Smith <[EMAIL PROTECTED]> wrote:
> C is the highest level assembler language I've ever used. And I've used a
> few. It really is cool that you can add two 32-bit integers and not have
> to worry about all those carry bits.
I was ever so pleased when I found out that the LLVM people have
l
Suresh Pillai wrote:
That's a good comparison for the general question I posed. Thanks.
Although I do believe lists are less than ideal here and a different data
structure should be used.
To be more specific to my case:
As mentioned in my original post, I also have the specific condition tha
Iain King wrote:
On Jul 25, 4:22 pm, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
It seems like the probability calculation applies to all three equally,
and can therefore be ignored for the simulations.
The probability affects (1) more. My reasoning for this being: as
probabilit
Having some trouble getting rpdb2 and winpdb running properly with
Python embedded in a C++ project.
Our implementation has a number of C++ classes associated with Python
classes.
I am able to attach to the embedded script with the debugger and the
program freezes and waits. However, when I step
sturlamolden wrote:
On Jul 25, 8:13 am, Pierre Dagenais <[EMAIL PROTECTED]> wrote:
What is the easiest way to draw to a window? I'd like to draw something
like sine waves from a mathematical equation.
Newbie to python.
For mathematica equations, NumPy and matplotlib is probably the best
opti
Jordan wrote:
Well this discussion is chugging along merrily now under its own
steam, but as the OP I should probably clarify a few things about my
own views since people continue to respond to them (and are in some
cases misunderstanding me.)
I *like* explicit self for instance variable access.
Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
Cutting to the crux of the discussion...
On Sun, 27 Jul 2
kj <[EMAIL PROTECTED]> wrote:
> Hi. I can't find any documentation for psycopg2.
>
> I'm a noob, so I'm sure I'm just not looking in the right place...
>
> Anybody know where it is?
For basic use, psycopg2 follows the dbapi, which is described in
http://www.python.org/dev/peps/pep-0249/
Additi
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> "if x" is completely type agnostic. You can pass an object of any type to
> it, and it will work. (Excluding objects with buggy methods, naturally.)
There are many circumstances where if a parameter is None I'd rather
get an exception than have the co
Ben Finney <[EMAIL PROTECTED]> wrote:
> No, he retracted the *insult* and restated the *advice* as a distinct
> statement. I think it's quite worthwhile to help people see the
> difference.
Ben, it was quite clear from Anders' post that he knows about
__nonzero__ . That's why the so-called advice
Paul Boddie <[EMAIL PROTECTED]> wrote:
> I do understand that it can be awkward to work out which object files
> need recompiling due to changes in source files, for example, and
> that one doesn't want to see the logic involved reproduced all over
> the place, but I do wonder whether the machiner
Carl Banks wrote:
On Jul 29, 11:12 am, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>Anders wrote:
>> "But then you decide to name the method "__nonzero__", instead of some
>> nice descriptive name?"
> That suggests to me that Anders imagined that __nonzero__ is something I
> just made up, instead of a standard Python method. What do
Carl Banks wrote:
On Jul 30, 1:58 am, "Russ P." <[EMAIL PROTECTED]> wrote:
On Jul 29, 10:33 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
Having said that, it would sure be nice to be able to write
if myList is not empty:
instead of
if len(
201 - 300 of 405 matches
Mail list logo