Hi,
On Tue, 23 Nov 2010 11:36:05 +0100
Ulrich Eckhardt wrote:
> Now, my problem is I have a directory containing test scripts which I
> all want to run. I used to run them individually and manually, but
> want to avoid this overhead in the future.
>
> tests/
>foo.py # defines TestFoo1 and
Am Tue, 21 Sep 2010 11:35:14 -0700 (PDT)
schrieb joblack :
> Let's say I've got a function with
>
> def doesSomething(A='bla'):
> ...
>
> and I try to call it with a non existent variable with
>
> doesSomething(DoesNotExist)
>
> What will happen? Will it throw an exception or will it take the
Am Mon, 20 Sep 2010 21:36:46 +1200
schrieb Lawrence D'Oliveiro :
> In message <20100920104546.3699e...@valun>, Gregor Horvath wrote:
>
> > Is there a encoder / decoder in Python that can convert arbitrary
> > text to and from this encoding in an readable manner?
>
Hi,
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
underscores ("_"), colons (":"), and periods ("."). [1]
Is there a encoder / decoder in Python that can convert arbitrary text
to and from this encoding in an re
Am Mon, 05 Jul 2010 14:32:13 -0500
schrieb Tim Chase :
> On 07/05/2010 02:50 AM, Gregor Horvath wrote:
> > Am Sun, 04 Jul 2010 18:51:54 -0500
> > schrieb Tim Chase:
> >
> >> I think it's the same venting of frustration that caused veteran
> >> VB6 dev
Am Sun, 04 Jul 2010 18:51:54 -0500
schrieb Tim Chase :
> I think it's the same venting of frustration that caused veteran
> VB6 developers to start calling VB.Net "Visual Fred" -- the
> language was too different and too non-backwards-compatible.
>
VB6 -> VB.NET and Python 2 -> 3 is not a vali
Hi,
Am Tue, 29 Sep 2009 09:40:29 -0700 (PDT)
schrieb Mars creature :
> I just start to use python and love this language. I met this
> problem when I try to save my functions in a separate file.
> The question is how I can pass a global variable to a function which
> is saved in another file. I
Hi,
Am Sun, 27 Sep 2009 00:13:47 -0700 (PDT)
schrieb Nash :
> I'm a big time python fan and it has helped me write code fast and
> push it out quickly. We have a medium sized telecom product written
> 90% in Python and 10% in Java. The problem is, in the place where we
> work (Pakistan), we can't
Hi,
For an application in an industrial environment where the workers are
not always sitting in front of the monitor, but are within earshot of
the PC I would need an sound / speech handler for the standard logging
system. It should beep or better say the logging message. (with
standard filtering
Am Mon, 31 Aug 2009 12:43:04 -0700 (PDT)
schrieb MikeC :
> I have a python executable that's failing to load on a user's machine
> running Windows XP. My developer machine is also running Windows XP. I
> have determined that it is failing when it attempts to load win32ui.
>
> I have Python 2.6 on
Gregor Horvath schrieb:
why is this code failing?
OK I answer myself :-)
Because there is not fset function definied in the property.
I have to del the attr before rebinding the attributename to another object.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
why is this code failing?
class B(object):
pass
B.testattr = property(lambda s:"hallo")
b = B()
b.testattr = "test"
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
/tmp/python-14202ViU.py in ()
14 B.testattr = property(lambda s:"hallo")
15 b = B()
---> 16 b.testattr = "tes
Peter Otten schrieb:
make your own function that loops over the attributes, or spell it
reduce(getattr, "a.test".split("."), B)
'test'
Thank's, but this does not work for this case:
class A(object):
test = "test"
class B(object):
a = [A(),]
In [70]: reduce(getattr, "a[0].test".s
Hi,
class A(object):
test = "test"
class B(object):
a = A()
In [36]: B.a.test
Out[36]: 'test'
In [37]: getattr(B, "a.test")
---
Traceback (most recent call last)
/ in ()
: type object 'B' has no attribut
D'Arcy J.M. Cain schrieb:
On Fri, 25 Apr 2008 20:27:15 +0200
Gregor Horvath <[EMAIL PROTECTED]> wrote:
>>> None <= 0
True
Why?
Why not?
Because, from http://www.python.org/dev/peps/pep-0020/ :
Errors should never pass silently.
In the face of ambiguity, refuse
Hi,
>>> None <= 0
True
Why?
Is there a logical reason?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
madzientist schrieb:
>
> Is Python a bad choice for the blind programmer, as a result of a
> tight linkage between visual aspects of the code and its function ? I
> wish the site blindprogramming.com weren't so lifeless...
There was a thread regarding blind people and python indentation shortly:
[EMAIL PROTECTED] schrieb:
> I agree with Steve. I have yet to see an IDE for Python (or anything
> else) that unindents statements. Even IDLE, the Official IDE for
> Python, doesn't do that.
emacs in python-mode
Just hit TAB and it unindents "else" in the given example.
Hit TAB again and it cy
Alex Martelli schrieb:
>
> Why, thanks for the pointer -- I'm particularly proud of having written
> """
> The only really workable way to develop large software projects, just as
> the only really workable way to run a large business, is a state of
> controlled chaos.
> """
Yes, indeed a good sa
Alexander Eisenhuth schrieb:
>
> I'm wodering how the information hiding in python is ment. As I
> understand there doesn't exist public / protected / private mechanism,
> but a '_' and '__' naming convention.
>
> As I figured out there is only public and private possible as speakin in
> "C+
Gerardo Herzig schrieb:
>
> @is_logued_in
> def change_pass():
>bla
>bla
>
> And so on for all the other functions who needs that the user is still
> loged in.
>
> where obviosly the is_logued_in() function will determine if the dude is
> still loged in, and THEN execute change_pass().
walterbyrd schrieb:
> Don't get me wrong: I am not saying that PHP is better than Python for
> web-development. But, I sometimes think that Python could learn a few
> things from PHP.
Yes, indeed we can learn that popularity is not superiority. ;-)
Gregor
--
http://mail.python.org/mailman/listi
Kay Schluehr schrieb:
> The problem is simply that the Python community has failed in this
> respect. There are many platform dependent and ideology driven ways to
> do deal with code editing / debugging but not actually a recommend or
> "pythonic" way. Other than Smalltalk, Python has not created
kimiraikkonen schrieb:
> My another aim is: Can i develop graphical applications (like in
> Windows) which contain menus, interactive dialog boxes etc. using
> Ptyhon?
>
> I got it quite but not sure. I don't know Ptyhon's capability skills
> for creating interactive softwares like in Windows's c
Kay Schluehr schrieb:
> That's what I love most about the Python community. Whenever there is
> just a non-standard, platform-dependent or crappy implementation of a
> feature you get told that you don't need it. When printf was good for
> little David print is good enough for me.
>
That's a pro
Jack schrieb:
> I didn't call del explicitly. I'm expecting Python to call it when
> the program exits. I put a logging line in __del__() but I never
> see that line printed. It seems that __del__() is not being called
> even when the program exits. Any idea why?
>
>
http://effbot.org/pyfaq/my-
[EMAIL PROTECTED] schrieb:
> opposed. But dismissing the fact that Outlook and other quite common
> tools may have severe problems with code seems naive (or disingenuous,
> but I don't think that's the case here).
Of course there is broken software out there. There are even editors
that mix tab
Paul Boddie schrieb:
> Perhaps, but the treatment by your mail/news software plus the
> delightful Google Groups of the original text (which seemed intact in
> the original, although I don't have the fonts for the content) would
> suggest that not just social or cultural issues would be involved.
Istvan Albert schrieb:
> On May 17, 2:30 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
>
>> Is there any difference for you in debugging this code snippets?
>
>> class Türstock(object):
>
> Of course there is, how do I type the ü ? (I can copy/paste for
&
Hendrik van Rooyen schrieb:
> I suppose that this "one language track" - mindedness of mine
> is why I find the mix of keywords and German or Afrikaans so
> abhorrent - I cannot really help it, it feels as if I am eating a
> sandwich, and that I bite on a stone in the bread. - It just jars.
Ple
[EMAIL PROTECTED] schrieb:
> With the second one, all my standard tools would work fine. My user's
> setups will work with it. And there's a much higher chance that all
> the intervening systems will work with it.
>
Please fix your setup.
This is the 21st Century. Unicode is the default in Pyt
Istvan Albert schrieb:
>
> After the first time that your programmer friends need fix a trivial
> bug in a piece of code that does not display correctly in the terminal
> I can assure you that their mellow acceptance will turn to something
> entirely different.
>
Is there any difference for you
Martin v. Löwis schrieb:
> I've reported this before, but happily do it again: I have lived many
> years without knowing what a "hub" is, and what "to pass" means if
> it's not the opposite of "to fail". Yet, I have used their technical
> meanings correctly all these years.
That's not only true f
HMS Surprise schrieb:
>
> #~~
> createdIncidentId = 0
> .
> .
> .
> #attempt to change varialbe
> createdIncidentID = 1
> .
> .
> .
> if createdIncidentId == 1:
>...
>
test.py is your code above
$ pychecker -v test.py
Processing test...
Warnings...
test.py:7: Variable
placid schrieb:
> Just wondering if there is any way of sending a JavaScript array to a
> Python cgi script? A quick Google search didn't turn up anything
> useful.
http://mochikit.com/doc/html/MochiKit/Base.html#json-serialization
http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.3/docs/i
Hendrik van Rooyen schrieb:
> I can sympathise a little bit with a customer who tries to read code.
> Why that should be necessary, I cannot understand - does the stuff
> not work to the extent that the customer feels he has to help you?
> You do not talk as if you are incompetent, so I see no rea
[EMAIL PROTECTED] schrieb:
> On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
>> Istvan Albert schrieb:
>>
>> So the solution is to forbid Chinese XP ?
>>
>
> It's one solution, depending on your support needs.
>
That would be
[EMAIL PROTECTED] schrieb:
>> 2) Create a way to internationalize the standard library (and possibly
>> the language keywords, too). Ideally, create a general standardized way
>> to internationalize code, possibly similiar to how people
>> internationalize strings today.
>
> Why? Or more acurate
Istvan Albert schrieb:
> Here is something that just happened and relates to this subject: I
> had to help a student run some python code on her laptop, she had
> Windows XP that hid the extensions. I wanted to set it up such that
> the extension is shown. I don't have XP in front of me but when I
Eric Brunel schrieb:
>
> The point is that today, I have a reasonable chance of being able to
> read, understand and edit any Python code. With PEP 3131, it will no
> more be true. That's what bugs me.
That's just not true. I and others in this thread have stated that they
use German or other
Eric Brunel schrieb:
> Highly improbable in the general context. If I stumble on a source code
> in Chinese, Russian or Hebrew, I wouldn't be able to figure out a single
> sound.
If you get source code in a programming language that you don't know you
can't figure out a single sound too.
How i
Hendrik van Rooyen schrieb:
> It is not so much for technical reasons as for aesthetic
> ones - I find reading a mix of languages horrible, and I am
> kind of surprised by the strength of my own reaction.
This is a matter of taste.
In some programs I use German identifiers (not unicode). I and o
[EMAIL PROTECTED] schrieb:
> code on the (GUI-less) production servers over a terminal link. They
> have to use all kinds of environments where they can't install the
> latest and greatest fonts. Promoting code that becomes very hard to
> read and debug in real situations seems like a sound nega
René Fleschenberg schrieb:
>> I love Python because it does not dictate how to do things.
>> I do not need a ASCII-Dictator, I can judge myself when to use this
>> feature and when to avoid it, like any other feature.
>
> *That* logic can be used to justify the introduction of *any* feature.
>
René Fleschenberg schrieb:
> today, to the best of my knowledge. And "in some form or another"
> basically means that the PEP would create more possibilities for things
> to go wrong. That things can already go wrong today does not mean that
> it does not matter if we create more occasions were th
Ross Ridge schrieb:
> non-ASCII identifiers. While it's easy to find code where comments use
> non-ASCII characters, I was never able to find a non-made up example
> that used them in identifiers.
If comments are allowed to be none English, then why are identifier not?
This is inconsistent becau
René Fleschenberg schrieb:
>
> We all know what the PEP is about (we can read). The point is: If we do
> not *need* non-English/ASCII identifiers, we do not need the PEP. If the
> PEP does not solve an actual *problem* and still introduces some
> potential for *new* problems, it should be rejected
dmitrey schrieb:
> howto check is object Arg1
> - a func, lambda-func
> - something else?
>
> I tried callable(Arg1), but callable(lambda-func) returnes False
I don't understand your problem:
>>> callable(lambda:0)
True
Please post your relevant code.
Greg
--
http://mail.python.org/mailman
George Sakkis schrieb:
> I'd like to gather advice and links to any existing solutions (e.g.
> libraries, frameworks, design patterns) on general ways of writing
> complex web forms, as opposed to the typical {name:value} flat model.
> A particular case of what I mean by complex is hierarchical for
Lad schrieb:
> On my website I allow users to upload files. I would like a user to see
> how much time is left before a file is uploaded. So, I would like to
> have a progress bar during a file uploading. Can Python help me with
> that?Or how can be a progress bar made?
> Thank you for ideas.
> L
walterbyrd schrieb:
>
> What other "gotchas" would I look for?
>
Maybe this is helpfull for you:
http://docs.turbogears.org/1.0/Hosting
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Fulvio schrieb:
>
> Is there some trick to apply the best search in wise use of resources while
> using the above said methods?
>
measure it:
http://docs.python.org/lib/module-timeit.html
Regarding your debugger question in the seperate thread I don't know
since I am not using a debugger at a
[EMAIL PROTECTED] schrieb:
> Would you normally write methods to retrive and set your class
> variables or just refrence them directly?
>
you start by referencing them directly and ONLY if you need you can add
getters and setters later on without breaking any client code.
see the property functi
Bruno Desthuilliers schrieb:
> yes : replace the link with another submit button, then in your
> controller check which submit has been successful and take appropriate
> action.
Thanks !
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
As I am no expert web programmer I thought I'd better ask the experts if
there is a simpler or better solution to my problem than the one I am
thinking of. (using TurboGears)
The problem
---
I have a form. Ok. you can submit, validate it etc.
Now I have a link on that form to another
Gregor Horvath schrieb:
>
> Is there any other solution, probably with metaclasses ?
>
I've found this one:
class mymeta(type):
def __new__(meta, class_name, bases, new_attrs):
new_attrs["edit"] = adecorator(new_attrs['xy'])(bases[0].edit)
Hi,
this:
class base(object):
@adecorator(xy)
def edit(self):
print "edit"
class child(base):
xy = 3
obviously fails because "xy" is not bound at class creation time of the
base object.
One solution could be delegation:
class base(object):
@classmethod
def edit(se
neoedmund schrieb:
> python use multiple inheritance.
> but "inheritance" means you must inherite all methods from super type.
> now i just need "some" methods from one type and "some" methods from
> other types,
> to build the new type.
> Do you think this way is more flexible than tranditional in
Sir Psycho schrieb:
>
> Im looking at making a site in Python, however, Im lost as to what ISPs
> actually support. Some ISPs say they support Python so does that mean
> if I wanted to use TurboGears It would just work anyway?
http://docs.turbogears.org/1.0/Hosting?highlight=%28hosting%29
--
James Stroud schrieb:
> project or package. How do people manage this? Do you run a script to
> find files with the .pyc extension and delete those before every commit,
> or is there a more elegant way? It seems like a lot of wasted bandwidth
> an memory on the server side to constantly be dealing
Larry Bates schrieb:
> I believe that your problem is that services run under Local
> System account. Normally Local System account would not have
> a drive mapping Y:\. You can change the account that a service
You are absolutly correct.
I moved the script to a local drive instead of a mapped
Hi,
I have a testservice.py (see below). I installed the Windows-Service
successfully. (via commandlineoption install)
The problem is that it runs only when it is in c:\windows\system32 or in
the python path.
I added the desired path (Y:\) to the PYTHONPATH environment variable
for the system acco
Jack schrieb:
> I'd like to set up a wiki system for a project I'm working on.
> Since I'm not good at databases, and there's really not much
> stuff to put into the wiki, I hope it is text file-based.
> I used DokuWiki before, which is very nice but it's written
> in PHP. Is there a similar system
[EMAIL PROTECTED] schrieb:
> a previous thread
>
> http://mail.python.org/pipermail/python-list/2002-June/107616.html
>
> discussed this issue, and Dave Moor kindly pointed to his solution.
> However this is no longer a current link, does anyone know if there is
> a currently available solution?
Paolo Pantaleo schrieb:
> How can I write a pareser for a certain gramamr? I found PyPy that
> does it, is thare any other tool? Maybe something built-in the python
> interpreter?
>
http://pyparsing.wikispaces.com/
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/
Hi,
[EMAIL PROTECTED] schrieb:
> I am reading a log file, and wondering what is the best way to read and
> analize this.
Look at:
http://pyparsing.wikispaces.com/
There is also an example for parsing an apache log.
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.or
Hi,
in a windows server python application I receive once a week suddenly
and not reproducible the following error. UnhandledException.rpt file:
//===
Exception code: C090 FLT_INVALID_OPER
Serge Orlov schrieb:
> I believe it's better to keep *everything* on the file server. Suppose
Certainly!
> your OS is windows and suppose you want to keep everything in s:/tools.
> The actions are:
> 3. Create little dispatcher s:/tools/win32/client.py:
> #!s:/tools/python24-win32/python.exe
> i
Hi,
My application is a client/server in a LAN. I want to keep my programs
.py files on a central File Server serving all clients. The clients
should load those over the LAN every time they start the program since I
expect that they are rapidly changing and I dont want to update each
client sepera
[EMAIL PROTECTED] schrieb:
>
> Is there a standard way to document protocols in Python? Of should I
> come up with something tailored to my needs.
>
Write unittests or doctest strings.
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Chris schrieb:
> How do I find and print to screen the IP address of the computer my
> python program is working on?
>
IP adresses are bound to network interfaces not to computers.
One Computer can have multiple network interfaces.
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://
[EMAIL PROTECTED] schrieb:
>
> Does Python have a mechanism for events/event-driven programming?
>
Probably this is something for you:
http://twistedmatrix.com/trac/
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Edward Elliott schrieb:
> On top of that, the expressive power of nested comments seems greater
> than an endless string of ^#s. Sometimes it's just easier to see what's
> going on.
not if you are using grep
--
Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/py
win32com.client.Dispatch(scopeProgID)
scope.Connected = True
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
Mobil: +43(0)69910879004
Fax: +43(0)1/25330333931 http://www.gregor-horvath.com
--
Mit freundlichen Grüßen,
Ing. Gregor Horv
to avoid having to
properly understand the way a von Neumann architecture (or Assembler) works?
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano schrieb:
> I don't know of many other OO languages that didn't/don't have
> inheritance,
VB4 - VB6
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
obgho
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
better approach.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
pliciation the goal is to only have problem or
domain specific code.
Middelware or ORM is a way to this goal because it encapsulates and
hides the technical details of persistence and helps for cleaner code.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareen
a COM Browser.
Or if you have MS-Office installed, there is a COM Browser in the VBA IDE.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Kevin Feng schrieb:
> More information about this error may be available in the server error log.
>
>
>
> Any suggestions? Much thanks.
>
What does the error log of the webserver say?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth schrieb:
> First off, never depend on __del__ to do anything critical. The only
Thanks to all of you!
Everything's clear now!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth schrieb:
> What is less obvious is that new style classes always include circular
> references, so a class is never detroyed until the garbage collector runs.
Thanks. I tried the same example with old style classes and A.__del__
gets correctly called.
> Of course, if your __del__
Felipe Almeida Lessa schrieb:
del B
# We'll to tell him to collect the garbage here, but
>
> ... # usually it should not be necessary.
Thanks. If I do
del B
then the __del__ of A gets called.
That surprises me. I thought that B gets del'd by python when it goes
out of scope?
Do I
Hi,
I do not understand why __del__ does not get executed in the following
example.
test.py:
#!/usr/bin/python
class A(object):
def __init__(self):
print "init"
def __del__(self):
print "del"
test1.py
#!/usr/bin/python
import test
class B(object):
a = test.A()
Running te
Gregor Horvath schrieb:
> if __name__ == "__main__":
> t = testtk()
> t.var.set("TEST")
>
> Result:
>
> _tkinter.TclError: can't set "PY_VAR0": invalid command name
> "-1210125972check"
>
>
> Any ideas, wh
Hi,
I searched the web and docs but cannot figure out whats wrong with this
code:
#!/usr/bin/python
import Tkinter as Tk
class testtk(Tk.Frame):
def __init__(self):
self.root = Tk.Tk()
Tk.Frame.__init__(self,self.root)
self.frame = Tk.Frame(self.root)
self.var = Tk.Stri
Hi,
Is there a possibility to format a log message to give the function name
where the log appears?
Example
import logging
def aTestFunction():
logger.debug("This is a message")
The log should read:
aTestFunction This is a message.
There is a possibilty to format the module namewith %(m
El Pitonero schrieb:
>
> The fact that you can override Python's "list()" function can be either
> viewed as pro or con. The fact that you can override member variables
> can also be viewed as pro or con.
>
If there is a tool like pyChecker, which can detect such pitfalls and
warns but not forb
Paul Rubin wrote:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>>Someone has a problem and tweaks a private variable as a workaround.
>
> They should have patched the source instead.
>
I think they are going to do that. In the meantime our friend has a
working sol
Paul Rubin schrieb:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>
>>Real open source live example from yesterdays mailinglists:
>
>
> I don't see any use of name mangling in that example.
Someone has a problem and tweaks a private variable as a workaround.
Paul Rubin schrieb:
>
> I don't know of a single program that's actually relying on the
> non-enforcement. I've asked for examples but have only gotten
> theoretical ones. As far as I can tell, the feature is useless.
Real open source live example from yesterdays mailinglists:
quick question:
Paul Rubin schrieb:
> Bill Mill <[EMAIL PROTECTED]> writes:
>
>>Python is for consenting adults.
>
> Python might be for consenting adults, but multi-person software
> projects are supposed to be done in the workplace, not the bedroom.
Are the numerous working python open source projects not mul
Paul Rubin schrieb:
>
> You could have a "friend" declaration like in C++, if you want to let
> some class see the private instance variables of another class.
Everything is said on this topic. There are two ligitimate solutions to
the problem of private instance variables. Its a matter of tas
Paul Rubin schrieb:
>
> If you don't want the compiler to make sure your private instance
> variables stay private, then don't declare them that way. You're the
> one asking for less flexibility.
I want to declare them as privat, but want to give the flexibilty to
access them at the users own
Paul Rubin schrieb:
>
> Huh? If my car has a "feature" that lets someone blow it to
> smithereens from hundreds of miles away without even intending to,
> that's somehow an advantage?
I would not accept a car that does constraint my driving directions. I
want to drive for myself, because its f
Paul Rubin schrieb:
> allowed to do that--that's why the variable is private. Is he
> supposed to get your permission every time he wants to change how the
> private variables in his class work?
>
No, but the assumption here is that the maintainer / designer of a class
alaways knows everything
Paul Rubin schrieb:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>
>>>to be able to share private variables with other classes under certain
>>>circumstances, it's better to use something like C++'s "friend"
>>>declaration, where you ca
Paul Rubin schrieb:
>
> Name mangling is a poor substitute for private variables. If you want
> to be able to share private variables with other classes under certain
> circumstances, it's better to use something like C++'s "friend"
> declaration, where you can export the variables to a specific
John Machin wrote:
>> f = file("I050901.ids").readlines()
>
> Y3K bug alert :-)
but then there is Python 3000 and Hurd, which solves all problems of
this universe :-)
> Something like this:
>
> >>> def munch(astrg):
> ...return [x[1:-1] for x in astrg.rstrip("\n")[1:-1].split(", ")]
T
1 - 100 of 118 matches
Mail list logo