Could someone please explain to me why the two values at the bottom of
this example are different?
Python-3.3 if it makes any difference.
Is this a difference in evaluation between a class attribute and an
instance attribute?
--rich
class C:
def __init__(self):
self._x = None
On 1/25/12 12:14 , Rick Johnson wrote:
You don't even need
"pretty" to get your point across.
If that's your argument, then we can drop the verb "to be", most
articles, most verb conjugations, and nearly all adjectives and adverbs.
For that matter, the vast majority of posts here can be drop
On 1/23/12 21:57 , Rick Johnson wrote:
Here is a grep from the month of September 2011 showing the rampantly
egregious misuse of the following words and phrases:
* pretty
* hard
* right
* used to
* supposed to
"Pretty" is the most ludicrous of them all! As you will see, "pretty"
is u
On 1/21/12 03:38 , Lie Ryan wrote:
It is only strictly necessary for programs that opens thousands of files
in a short while, since the operating system may limit of the number of
active file handlers you can have.
The number you're looking for is 20 on many unix systems. That's all.
20 concu
On 1/20/12 07:44 , Andrea Crotti wrote:
I normally didn't bother too much when reading from files, and for example
I always did a
content = open(filename).readlines()
But now I have the doubt that it's not a good idea, does the file
handler stays
open until the interpreter quits?
So maybe doin
On 1/11/12 12:16 , Máté Koch wrote:
Hello All,
I'm developing an app which stores the data in file system database. The data
in my case consists of large python objects, mostly dicts, containing texts and
numbers. The easiest way to dump and load them would be pickle, but I have a
problem wit
On 1/11/12 18:19 , Matthew Pounsett wrote:
Second, I'm trying to get a handle on how libraries are meant to
integrate with the applications that use them. The naming advice in
the advanced tutorial is to use __name__ to name loggers, and to allow
log messages to pass back up to the using applica
On 1/9/12 16:41 , Philipp Hagemeister wrote:
I want to forbid my application to access the filesystem. The easiest
way seems to be chrooting and droping privileges. However, surprisingly,
python loads the codecs from the filesystem on-demand, which makes my
program crash:
import os
os.getuid()
Once I've instantiated my server class, along with a handler class,
called server.serve_forever(), handler.handle() has been called, I've
done my work, and I'm ready to shut the whole thing down...
How do I do that?
The doc says server.shutdown(), but if I call self.server.shutdown()
from wit
You get some of the good stuff by importing future, unicode literals
which essentially means you're working in unicode by default most of the
time, and print function, (a small fix but long overdue).
I try to write python3 whenever I can. It's rare that dependencies keep
me back. More often
On 1/2/12 13:03 , Benjamin Kaplan wrote:
On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley wrote:
Where would I look to find the current expected status of python3 on MacOsX
Lion?
The distributed binaries aren't capable of allowing extensions that use gcc.
I can build the source naked
Where would I look to find the current expected status of python3 on
MacOsX Lion?
The distributed binaries aren't capable of allowing extensions that use gcc.
I can build the source naked, but then it lacks some libraries, notably,
readline.
Attempting to build the full Mac packages fails, e
On 1/1/12 19:04 , K Richard Pixley wrote:
On 1/1/12 16:49 , K Richard Pixley wrote:
I'm having trouble finding a reasonable python environment on mac.
The supplied binaries, (2.7.2, 3.2.2), are built with old versions of
macosx and are not capable of building any third party packages
On 1/1/12 16:49 , K Richard Pixley wrote:
I'm having trouble finding a reasonable python environment on mac.
The supplied binaries, (2.7.2, 3.2.2), are built with old versions of
macosx and are not capable of building any third party packages that
require gcc.
The source builds easily e
I'm having trouble finding a reasonable python environment on mac.
The supplied binaries, (2.7.2, 3.2.2), are built with old versions of
macosx and are not capable of building any third party packages that
require gcc.
The source builds easily enough out of the box, (./configure
--enable-fra
On 12/29/11 23:17 , Paulo da Silva wrote:
Hi,
Sorry if this is a FAQ, but I have googled and didn't find any
satisfatory answer.
Is there a simple way, preferably multiplataform (or linux), of
generating sinusoidal/square waves sound in python?
Thanks for any answers/suggestions.
I just poste
On 12/29/11 05:55 , Jérôme wrote:
I'm writing a small application that plays sound through the speakers. The
sounds are juste sine waves of arbitrary frequency I create in the code, not
sample .wav files.
I didn't expect the choice for an audio library to be that complicated. There
are several l
On 12/27/11 12:34 , Ian Kelly wrote:
On Tue, Dec 27, 2011 at 1:31 PM, K Richard Pixley wrote:
On 12/27/11 10:28 , Ian Kelly wrote:
On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixleywrote:
The conceptual leap for me was in recognizing that a class is just an
object. The best way, (imo
On 12/27/11 10:26 , Andrew Berg wrote:
On 12/27/2011 11:59 AM, K Richard Pixley wrote:
You'd do better to encourage eclipse, but setting that up isn't
trivial either.
IIRC, all I had to do to set up PyDev was copy a URL to Eclipse's
"Install New Software" wizard, and
On 12/27/11 10:21 , Rick Johnson wrote:
On Dec 27, 11:59 am, K Richard Pixley wrote:
The problem is that IDLE is hard to set up. (I've never managed it and
I'm a well seasoned veteran).
Can you qualify that statement? Do you mean "difficult to set up on
certain OS's&q
On 12/27/11 10:28 , Ian Kelly wrote:
On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixley wrote:
The conceptual leap for me was in recognizing that a class is just an
object. The best way, (imo, so far), to create a singleton in python is to
use the class itself as the singleton rather than
On 12/19/11 19:51 , Raymond Hettinger wrote:
Do you use IDLE when teaching Python?
If not, what is the tool of choice?
If your goal is to quickly get new users up and running in Python,
what IDE or editor do you recommend?
I would:
a) let the students pick their own editor.
b) encourage ema
On 12/26/11 21:48 , Fredrik Tolf wrote:
On Mon, 26 Dec 2011, K. Richard Pixley wrote:
I don't understand. Can anyone explain?
I'm also a bit confused about __new__. I'd very much appreciate it if
someone could explain the following aspects of it:
* The manual (<http
On 12/26/11 20:53 , Steven D'Aprano wrote:
On Mon, 26 Dec 2011 20:28:26 -0800, K. Richard Pixley wrote:
I'm confused about the following. The idea here is that the set of
instances of some class are small and finite, so I'd like to create them
at class creation time, then hi
I'm confused about the following. The idea here is that the set of
instances of some class are small and finite, so I'd like to create them
at class creation time, then hijack __new__ to simply return one of the
preexisting classes instead of creating a new one each call.
This seems to work i
Can anyone explain to me why this doesn't work?
class Foo(object):
@property
@classmethod
def f(cls):
return 4
I mean, I think it seems to be syntactically clear what I'm trying to
accomplish. What am I missing?
--rich
--
http://mail.python.org/mailman/listinfo/python-lis
Does anyone have this combination working?
And if so, which version of ubuntu and what did you have to do to get it
to work?
--rich
--
http://mail.python.org/mailman/listinfo/python-list
27 matches
Mail list logo