Kay Schluehr wrote:
> Bruno Desthuilliers wrote:
>
>>Sanjay wrote:
>>
>>>Hi Alex,
>>>
>>>Thanks for the input.
>>>
>>>Being new to Python, and after having selected Python in comparison to
>>>ruby (Turbogears vs Rails) ,
n ["%s%s%s%s" % (a, b, c, d) \
for a in r \
for b in r \
for c in r \
for d in r]
But there's certainly better solutions...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('
es is
> when you want to separate your GUI code from the rest of your logic.
What the ... is GUI code doing in a domain object ???
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
edge of the technologies involved,
> is that assign_mapper does some magic only on Person class, and things
> work. But after inheritence, it is not working.
Anyway, there are other ways to reuse implementation, like
composition/delegation. You may want to have a look at
__getattr
ressor, then combuster, then turbine
but I don't know if it makes any sens wrt/ your app !-)
Now there can of course be a lot of other solutions...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Bruno Desthuilliers wrote:
>
>>Boris Borcic a écrit :
>>
>>>Hello Bruno,
>>>
>>>Bruno Desthuilliers wrote:
>>>
>>>
>>>>Boris Borcic wrote:
>>>>
>>>>
>>>>&g
Steve Holden wrote:
> Bruno Desthuilliers wrote:
>
>> Boris Borcic a écrit :
>>
>>> Hello Bruno,
>>>
>>> Bruno Desthuilliers wrote:
>
> [...]
>
>>>> Or how to *not* address the real problem...
>>>>
>>>&
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
>>mystilleef wrote:
(snip)
>>>>>
>>>>>Of course using setters for the sake of just using them is pointless.
>>>>
>>>>Indeed.
>>>>
>>>>
>>>>
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
>>mystilleef wrote:
>>
(snip)
>>>>>For example, a third party randomly changing
>>>>>is_active, (which Python lets you do freely and easily)
>>>>
>>>>Unless you make it a
[EMAIL PROTECTED] a écrit :
>>Even if you need to do something during attachment of components it is
>>more Pythonic to use properties. So you will write a method in your
>>class name something like _set_up(self,upstream_obj) an _get_up(self).
>> And then at the end of your class put up=property(_
Tobias Brox a écrit :
> [Jason]
>
>>Nothing like being forced to write getters and setters in C++/Java
>>before you feel like shooting your source code. Please don't bring
>>this code-rage into Python.
>
>
> "Code generation" springs into my mind. IMO, if the code needs to be
> generated, the
_dict__[name] = value
Make it:
object.__setattr__(self, name, value)
Your approach will lead to strange results if you mix it with properties
or other descriptors...
> class C1(C):
>
> standard_attributes = ['a1', 'a2']
DRY viol
>
> I can't believe I always used version control systems for that use case if
> it's that easily solved with partial classes.
Collaborative work is only one of the needs solved by VCS.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1
danielx wrote:
> Bruno Desthuilliers wrote:
>
>>danielx wrote:
(snip)
>>>which gets me thinking again about
>>>the stuff I self-censored. Since the dot syntax does something special
>>>and unexpected in my case,
>>
>>"unexpected" ? Di
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Bruno Desthuilliers
> wrote:
>
>
>>Lawrence D'Oliveiro wrote:
>>
>>>In message <[EMAIL PROTECTED]>, Bob Greschke
>>>wrote:
>>>
>>>
>>>
>>
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
>>mystilleef wrote:
>>
>>>Bruno Desthuilliers wrote:
>>>
>>>
>>>>mystilleef wrote:
>>
>>(snip)
>>
>>>>>>>Of course using setters for the sake of just us
Dennis Lee Bieber wrote:
> On Wed, 19 Jul 2006 18:54:55 +0200, Bruno Desthuilliers
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>>Indeed. And when you don't need too ? (the second 'o' is not a typo)
>>
>
>
s = [objects[upname] for upname in desc['upstream']]
downs = [objects[downname] for downname in desc['downstream']]
target.links(upstream=ups, downstream=downs)
return objects
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Bruno Desthuilliers wrote:
>
>>[EMAIL PROTECTED] wrote:
>
> [...]
>
>>>Sorry, but I kinda agree with Boris here.
>>
>>On what ?
>
>
> On the argument that you are (implicitly?) disagreeing with him
it's
e anyone making such a claim.
(snip)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
read-only property named 'is_active' returning the value of
an attribute named '_is_active' doesn't prevent direct access to
'_is_active' attribute, neither from the class nor from the client code.
HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Matthew Wilson wrote:
> On Thu 20 Jul 2006 04:32:28 AM EDT, Bruno Desthuilliers wrote:
(snip)
>
>>>class C1(C):
>>>
>>>standard_attributes = ['a1', 'a2']
>>
>>DRY violation here. And a potential problem with inheritance
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
(snip)
>>>>>You use accessors when you need to control access to a data attribute.
>>>>
>>>>Indeed. And when you don't need too ? (the second 'o' is not a typo)
>>>>
>>
... # that defines 'newArgs' and 'predicate' of course ...
return (recursiveFunction, lambda x: 0)[predicate](newArgs)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
mystilleef wrote:
> Bruno Desthuilliers wrote:
>>>>>>point 2 : so anyone *can* "illegimately tampering with an object's
>>>>>>internal data" at will.
>>>>>>
>>>>>
>>>>>And this is robust how?
&
Diez B. Roggisch a écrit :
>> You mean:
>>
>> class Pythonic(object):
>> def __init__(self):
>> self._is_active = True
>>
>> @apply
>> def is_active():
>> def fget(self): return self._is_active
>> def fset(self): raise SomeException('sorry, read-only')
>> return
Gerhard Fiedler a écrit :
> On 2006-07-20 09:40:31, Bruno Desthuilliers wrote:
>
>
>>>I'm not sure, but there's one thing that has a potential to be the real
>>>issue: what's the common way to create a property that is read-write
>>>for t
Dennis Lee Bieber a écrit :
> On Thu, 20 Jul 2006 12:52:52 +0200, Bruno Desthuilliers
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>>Granted. Actually, it *was* a typo - but it happened to also make sens,
>>so I decided it was not a typo
Ant a écrit :
> Came across this article this afternoon - thought it may be of interest
> to some of those following this thread...
>
> http://www.devx.com/opensource/Article/31593/0/page/2
>
Yeah. Presenting name mangling as the usual way to have 'private'
attributes, then implementing (costly)
[EMAIL PROTECTED] a écrit :
> Hiya
>
> Could you just talk me through this... is it:
>
>
>>schema = {'turbine1': {'class': 'Turbine',
>> 'upstream' : ('frobnicator2',),
>> 'downstream' : () # nothing,
>> },
>> 'frobnicato
danielx wrote:
> Bruno Desthuilliers wrote:
>
>>danielx wrote:
>>
(snip)
>>>
>>>Obviously, such things would be omitted from your docs, but users also
>>>learn by interacting with Python, which is really one of Python's great
>>>virtues.
gt;>>
>>>Time to tear out that page. Really.
>>
>>Not quite - 2.5 hasn't been released in its final version yet, and many
>>projects I should imagine will take a while to upgrade.
>
>
> Ok, use
>
> if cond:
>value = ... # expression tha
of othermodule,
or your used the "import othermodule" form, in which case it's pretty
obvious which names belongs to othermodule.
Have any other, possibly valid, reason ?
> And I find variable starting or ending with an underscore ugly. :-)
Too bad for you. Choose another languag
danielx wrote:
> Bruno Desthuilliers wrote:
>
>>danielx wrote:
>>(snip)
>>
>>
>>>Python's lambda really can't be as powerful as Lisp's because Python
>>>does not have expressions that do case analysis (this is not lambda's
&g
urse give a name when instanciating the object:
class Named(object):
def __init__(self, name):
self.name = name
n1 = Named('n1')
print n1.name
=> n1
But this doesn't mean there's any correspondance between this name and a
name in the current (or any other) namespace:
toto = n1
n1 = "lalala"
print toto.name
=> n1
locals()[toto.name] is toto
=> False
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
dex = foo.options.index
> bar.output = foo.options.output
> bar.run()
>
> This works, but it feels hokey or unnatural to "pass" data from one
> class to another. Isn't there a better way???
What's wrong with:
foo = Parse_Option()
bar = Processor()
bar.run(fo
Lawrence D'Oliveiro a écrit :
> In message <[EMAIL PROTECTED]>, Georg Brandl wrote:
>
>
(snip)
>>Other than in PHP, Python has clear rules when an object of a builtin type
>>is considered false (i.e. when it's empty). So why not take advantage of
>>this?
>
> Because the clearest rule of all is
Lawrence D'Oliveiro a écrit :
> In message <[EMAIL PROTECTED]>, T wrote:
>
>
>>I am using an optparse to get command line options, and then pass them
>>to an instance of another class:
>>
>>
>>
>># Class that uses optparse.OptionParser
>>foo = Parse_Option()
>>
>># Class that does the real work
>
Tim N. van der Leeuw a écrit :
> Hi,
>
> I'd like to know if there's a way to check if an object is a sequence,
> or an iterable. Something like issequence() or isiterable().
>
> Does something like that exist? (Something which, in case of iterable,
> doesn't consume the first element of the iter
[EMAIL PROTECTED] a écrit :
> What is the idiomatically appropriate Python way to pass, as a
> "function-type parameter", code that is most clearly written with a
> local variable?
def functionWithLocal(andArg):
localVar = 42
return andArg+localVar
map(functionWithLocal, range(42))
> For
Josiah Manson a écrit :
> I found that I was repeating the same couple of lines over and over in
> a function and decided to split those lines into a nested function
> after copying one too many minor changes all over. The only problem is
> that my little helper function doesn't work! It claims tha
Justin Azoff a écrit :
> Simon Forman wrote:
>
>>That third option seems to work fine.
>
>
> Well it does, but there are still many things wrong with it
>
(snip)
> tok = ''
> tok = toc + c
> should be written as
> tok = []
> tok.append(c)
> and later
> ''.join(toc)
IIRC, s
Justin Azoff a écrit :
> Simon Forman wrote:
>
>>That third option seems to work fine.
>
>
> Well it does, but there are still many things wrong with it
>
> if len(tok) > 0:
> should be written as
> if(tok):
>
actually, the parenthesis are useless.
--
http://mail.python.org/mailman/l
Lawrence D'Oliveiro a écrit :
> In message <[EMAIL PROTECTED]>, Justin
> Azoff wrote:
>
>
>>Simon Forman wrote:
>>
>>>That third option seems to work fine.
>>
>>Well it does, but there are still many things wrong with it
>>
>>if len(tok) > 0:
>>should be written as
>>if(tok):
>
>
> I p
Lawrence D'Oliveiro a écrit :
> In message <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
>
>> b) give up on using an anonymous function and create a named "successor"
>> function with "def",
>
>
> This is what you have to do.
Not necessarily.
map(lambda x, one=1: one + x, range(42))
>
danielx a écrit :
> Bruno Desthuilliers wrote:
>
>>danielx wrote:
>>
>>>Bruno Desthuilliers wrote:
>>>
>>>
>>>>danielx wrote:
>>>>
>>
>>(snip)
>>
>>>>>Obviously, such things would be omitted
danielx a écrit :
>
(snip)
> Sigh. I TOTALLY realize that Python works by politeness and not
> enforcement. I think you are misinterpreting why I think this would be
> a good idea. My concern is not with control, but with convenience.
Having free access to implementation is convenient IMHO.
> My
danielx a écrit :
> Bruno Desthuilliers wrote:
>
>>danielx a écrit :
>>
>>>Bruno Desthuilliers wrote:
>>>
>>>
>>>>danielx wrote:
>>>>
>>>>
>>>>>Bruno Desthuilliers wrote:
>>>>>
>&g
Marc 'BlackJack' Rintsch a écrit :
> In <[EMAIL PROTECTED]>, Bruno Desthuilliers wrote:
>
>
>>Tim N. van der Leeuw a écrit :
>>
>>>Hi,
>>>
>>>I'd like to know if there's a way to check if an object is a sequence,
&
;s one builtin.
> while in the second case you just execute the file, and besides, you
> can edit it with any Python editor.
>
This is certainly nice when the users are able to write python code, but
that's not always the case. Also, it can be dangerous to directly
execute user'
Antoon Pardon wrote:
> On 2006-07-21, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>>Antoon Pardon wrote:
>>
>>>On 2006-07-21, fuzzylollipop <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>>danielx wrote:
>>>>
>>
t way: the view of the Python
community is that language-inforced access restrictions are useless and
annoying, IOW an unnecessary pain. Which doesn't imply that messing with
implementation of other modules is actually *encouraged*. Having the
possibility to easily do so is quite handy when that's the only/less
worse solution, but is not a recommended approach in general.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
(snip)
> First point: the nested function only have access to names that exists
> in the enclosing namespace at the time it's defined.
Duh.
Sometimes I'd better go to bed instead of answering posts here - I'd say
less stupidities. re-reading th
danielx wrote:
> Bruno Desthuilliers wrote:
>
>>Josiah Manson a écrit :
>>
>>>I found that I was repeating the same couple of lines over and over in
>>>a function and decided to split those lines into a nested function
>>>after copying one too man
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Bruno Desthuilliers
> wrote:
>
>
>>Lawrence D'Oliveiro a écrit :
>>
>>
>>>If you're calling a number of different routines in
>>>the Processor class, all accessi
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Steve
> Holden wrote:
>
>
>>Lawrence D'Oliveiro wrote:
>>
>>>In message <[EMAIL PROTECTED]>, Bruno Desthuilliers
>>>wrote:
>>>
>>>
>>>
&g
Michael Yanowitz a écrit :
> Hello:
>
>Maybe I am missing something, but from what I've seen,
> it is not possible to overload functions in Python. That
> is I can't have a
> def func1 (int1, string1):
>and a
> def func1 (int1, int3, string1, string2):
> without the second func1 o
[EMAIL PROTECTED] a écrit :
>>>First case is a little shorter but then you have to use a parser for it
>>
>>There's one builtin.
>
>
> do you mean 'configparser'?
Yes.
> I'm just trying to figure out how this
> works.
One nice thing with Python is the interactive python shell. It makes
expl
these bugs or features?
Features, definitively.
> If they are features, don't they create
> problems as the project gets larger?
My experience is that with medium/large projects, this feature can
actually help to solve a lot of problems in a much more simpler and
straightforward way th
racle support
> committed--but is it going to make it into any release any time soon?
>
You'd probably get better answers on Django's mailing-list ?
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) f
self.regressors = regressors[:] # makes a copy of the list
2/ deep copy, in case you need it (but read the Fine Manual before...):
import copy
class MultipleRegression:
def __init__(self, dbh, regressors, fund):
self.dbh = dbh
self.regressors = copy.deepcopy(regressors)
> I really
sses:
* you overwrite self.regressors somewhere else
* there's at least one case where you instanciate MultipleRegression
with someting that is not iterable.
FWIW, always try to reduce code to the minimal runnable snippet
exhibiting the problem, so others have a chance to help you. As a
side-effect
ot depending on any DB or whatever. Nothing prevents
you from replacing these parts with mock objects returning dummy data.
And this is exactly why this process very often reveals the problem...
> Thanks for you help anyways, I'll try and figure out what I can. If
> necessary I'll
[EMAIL PROTECTED] wrote:
> Bruno may be right. At some point I've got
>
> del self.regressors[fundNumber]
oops... You're probably in for troubles with this:
>>> l = [1, 2, 3, 4]
>>> del l[1]
>>> l
[1, 3, 4]
>>> del l[1]
>>> l
[
server run under some user ("www-data" or such).
> so howi can i make this user (and the web) be able to run my python
> code without having to install the modules as shared. (which i dont
> think they will allow me).
import sys
sys.path.append('/home/amir/')
should
few chances you get any useful answer on a unspecified
web framework here.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
; depending on whether the pointer gets used for writing and reading, or only
> for reading).
In most languages, you have to explicitly declare local names one way or
another. Python takes the opposite route : you have to explicitly
declare global names. Since you don't declare local names, binding
creates the name if it doesn't already exists in the local namespace.
HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Joe Knapka wrote:
(snip)
> Classes are effectively open in Python, too, at least
> where methods are concerned, since one can do
> klass.__dict__["myMethod"]=myMethod.
actually, klass.myMethod = myMethod is enough...
--
bruno desthuilliers
python -c "print '@'
're not in the file, obviously, no - whatever "uml heading" might
be.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
ttributes - but nothing like "headings".
file.readlines() iterates over lines of a opened text file - it doesn't
give a damn about what this text is, xml, python code, csv or whatever.
If your file contains xml and you want to interpret the xml, you have to
use a xml parser.
--
e, which has a RelativeDateTime
type that seems to do what you want:
http://www.egenix.com/files/python/mxDateTime.html
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
ned Smalltalk's one)
FWIW, Lisp-like macro-system apart, I have difficulty imagining how a
language could be more dynamic than Python...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROT
John Machin wrote:
> Bruno Desthuilliers wrote:
>
>>thebjorn wrote:
>>
>>>For the purpose of finding someone's age I was looking for a way to
>>>find how the difference in years between two dates, so I could do
>>>something like:
>>>
&
Jaroslaw Zabiello wrote:
> On Wed, 26 Jul 2006 16:25:48 +0200, Bruno Desthuilliers wrote:
>
>
>>I have difficulty imagining how a language could be more dynamic than
>>Python...
>
>
> E.g. try to extends or redefine builtin Python classes on fly.
Ok, this
IMHO.
Jaroslaw, don't take me wrong, I really think that Ruby is a really nice
language (while not as mature as Python when it comes to implementation
and libraries). But I'm afraid that all your arguments here are nothing
more than the usual Ruby/Rails hype.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Jaroslaw Zabiello wrote:
> On Wed, 26 Jul 2006 18:01:50 +0200, Bruno Desthuilliers wrote:
>
>
>>>>I have difficulty imagining how a language could be more dynamic than
>>>>Python...
>>>
>>>E.g. try to extends or redefine builtin Python classes o
John Machin wrote:
> Bruno Desthuilliers wrote:
>
>>John Machin wrote:
>>
>>>Bruno Desthuilliers wrote:
>>
>>>Which pieces of the following seem to be working to you?
>>
>>John, it seems you failed to notice the use of "may" and &qu
uper):
def __init__(self, **kwargs):
Super.__init__(self, **kwargs)
# do additional extender-specific stuff here
HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>
>>>Ruby has nice security system (private, protected, public scopes
>>>for methods and attributes,
>>
>>This is not "security", this is data-hiding. And IIRC, Ruby's attr
thebjorn wrote:
> Bruno Desthuilliers wrote:
> [...]
>
>>Possible solution:
>>
>>import mx.DateTime as dt
>>def age(date):
>>return dt.Age(dt.today(), date).years
>>born = dt.Date(1967, 5, 1)
>>assert age(born) == 39
>
>
> dealb
estriction/
> --I guess I've been doing Java too long :)
indeed !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
:
>
> What are the benefits from this? There must be something really good
> (and hopefully safe) you can do with it only from the outside. I don't
> have much problem over-riding functions from the inside of the class.
> But from the outside, I fail to see why anyone needs to a
Jaroslaw Zabiello wrote:
> On Wed, 26 Jul 2006 18:20:44 +0200, Bruno Desthuilliers wrote:
>
>
>>May I suggest that you learn some Lisp dialect ?
>
>
> Nope. I hate Lisp syntax.
This should not prevent you from learning it - at least, you'd then
avoid making
Jaroslaw Zabiello wrote:
> On Wed, 26 Jul 2006 18:23:22 +0200, Bruno Desthuilliers wrote:
>
>
>>>>Care to write an external DSL in Ruby ?
>>>
>>>?
>>
>>I mean : write a parser and interpreter for a DSL. In Ruby.
>
>
> I see. Nope.
Ray wrote:
> Bruno Desthuilliers wrote:
>
>>Ray wrote:
>>Ray, please, don't top-post
>
>
> Um, top-post? I'm using Google News and it looks like it is placed
> correctly in the thread... or you're referring to a different thing?
http://en.wikipedia.
Kay Schluehr wrote:
> Bruno Desthuilliers wrote:
>
>
>>>>Care to write an external DSL in Ruby ?
>>
>>I mean : write a parser and interpreter for a DSL. In Ruby.
>
>
> It is this kind of stuff Rubys talk about when they mention "DSLs in
>
danielx wrote:
> Bruno Desthuilliers wrote:
>
(snip)
>>
>>>Surprising for me are actually two things: 1- the fact itself, and 2- that
>>>term "binding", and that whatever it means > (I'll have to read more on that,
>>>now that I know the
I need a full blown app-specific DSL - which can be as simple
as a Python file with dicts, lists, etc !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> On 2006-07-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>>danielx wrote:
>>
>>>Bruno Desthuilliers wrote:
>>>
>>
>>(snip)
>>
>>>>>Surprising for me are actually two things: 1- the fact itsel
Antoon Pardon wrote:
> On 2006-07-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
(snip)
>>>>It can only take you so far. Now it's time you know the truth: there are
>>>>*no* 'variables' in Python (hence the term 'binding').
>&g
Gerhard Fiedler wrote:
> On 2006-07-27 09:42:16, Bruno Desthuilliers wrote:
>
>
>>>Are you saying Python variables don't hold references to "actual" Python
>>>objects?
>>
>>Exactly.
>>
>>
>>>That idea has been working w
Antoon Pardon a écrit :
> On 2006-07-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>>Antoon Pardon wrote:
>>
>>>On 2006-07-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>>>
>>
>>(snip)
>>
>>>>>&g
Gerhard Fiedler a écrit :
> On 2006-07-27 13:44:29, Bruno Desthuilliers wrote:
>
>
>>What bother me with the "hold" term is that I understand it as meaning
>>that the name is some kind of container by itself - which it is not.
>>Consider the following:
Gerhard Fiedler a écrit :
> On 2006-07-25 13:33:40, Dennis Lee Bieber wrote:
>
>
>>>Surprising for me are actually two things: 1- the fact itself, and 2- that
>>>term "binding", and that whatever it means (I'll have to read more on that,
>>>now that I know the term) is different for read-only and
Gerhard Fiedler a écrit :
> On 2006-07-27 14:15:34, Dennis Lee Bieber wrote:
>
>
>>>In a language like C the name doesn't hold anything either. The name is
>>>just a way for refering to a memory space which will hold something.
>>>
>>
>> Except for one difference... In C (and most other lan
bei a écrit :
Please don't top-post
> Hi,Simon,
>
> Thanks for your reply.It's very helpful :)
> But I am sorry for my given example.Actually, my data in the arrays are
> all float point datas.And I use integer in the example.The code is like
> this.
> ("x,v,...,h" are floating point number arra
Khoa Nguyen a écrit :
> Hi,
>
> I have a requirement to process all files in a directory in
> chronological order.
Access time, modification time ? Ascending, descending ?-)
> The os.listdir() function, however, lists the
> files in random order. Is there a similar function in Python that
> allo
Gerhard Fiedler a écrit :
> On 2006-07-27 17:10:55, Bruno Desthuilliers wrote:
>
>
>>>Isn't being on the LHS the only way to write to a non-mutable object?
>>
>>You *don't* "write to a non-mutable object". You rebind the name to
>&g
[EMAIL PROTECTED] a écrit :
>>>Hiya, you might be interested in this alternative config parsing
>>>program:
>>>http://www.voidspace.org.uk/python/configobj.html
>>
>>Yes, I know it. But I don't like it. Either a simple ini file do the
>>trick, or I need a full blown app-specific DSL - which can be
thebjorn wrote:
> Bruno Desthuilliers wrote:
>> Which conversion ? How do you get the data ? as a datetime object ? as a
>> (y,m,d) tuple ? as a "y-m-d" string ? Else ?
>
> All input routines, whether they're from a web-form, database, command
> line, or a
401 - 500 of 4404 matches
Mail list logo