fuck! fuck! i'm gonna be fired if i didnt get this shit! i told my boss id
do it. fuck! im gonna pipe some crakc. fuck...
2013/5/26 Mark Lawrence
> On 26/05/2013 20:10, Daniel Gagliardi wrote:
>
>> I want to know how to implement concurrent threads in Python
>>
>&g
I want to know how to implement concurrent threads in Python
--
http://mail.python.org/mailman/listinfo/python-list
All of the above, plus:
- Best Pythonic tools for GUI
- notorious projects (in science, education, NGOs, etc) using python
Please keep us informed, and best wishes
Daniel
El 25/05/2013, a las 07:29, Michael Poeltl
escribió:
> * DRJ Reddy [2013-05-25 05:26]:
>> Planning to start
Today, being the last day of lectures at school, my instructor ran briefly
through Tkninter and GUIs. I'd been looking forward to this particular lesson
all semester, but when I got home and copied a sample program from my textbook
verbatim, IDLE does nothing. No error, no nothing. Any ideas? He
e's
> structure. When type->tp_flags & Py_TPFLAGS_BASETYPE is true then
> subclassing is allowed. But I know of no way to retrieve that
> information from Python code.
There is an (undocumented and CPython-specific) way:
>>> range.__flags__ & (1 << 10)
0
>&
"John Gordon" wrote in message
news:keaa9v$1ru$1...@reader1.panix.com...
In "Daniel W. Rouse Jr."
writes:
I have recently started learning Python (2.7.3) but need a better
explanation of how to use tuples and dictionaries.
A tuple is a linear sequence of items, acc
"Chris Angelico" wrote in message
news:mailman.1197.1359515470.2939.python-l...@python.org...
On Wed, Jan 30, 2013 at 1:55 PM, Daniel W. Rouse Jr.
wrote:
I am currently using "Learning Python" by Mark Lutz and David Ascher,
published by O'Reilly (ISBN 1-565
Hi all,
I have recently started learning Python (2.7.3) but need a better
explanation of how to use tuples and dictionaries.
I am currently using "Learning Python" by Mark Lutz and David Ascher,
published by O'Reilly (ISBN 1-56592-464-9)--but I find the explanations
insufficient and the numb
rlier!
Indeed..
BTW, I also use vim only,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
uri( uri ):
return uri.split( '//' )[1]
and it seems to work. In the program the function is always called in
a try: except: block so if anything is not okay it will get caught, I
don't have to catch exceptions inside the function.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
ave simply lifted it.
Does anyone know what a good replacement for get_local_path_from_uri
is? Is there a gtk/gnome/etc related python package that contains it
which would work with gnome 3? Or a totally gnome-independent python
implementation?
Cheers,
Daniel
--
Psss, psss, put it down! - http
>> a, b, c, *rest = myiterable
>> Thanks, sounds great, how about python2?
>>
>
> If you know the sequence has at least n items, you
> can do a, b, c = seq[:3]
Yeah, that's probably the simplest, without all the fancy stuff :)
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
>>Hi folks, I swear I used to know this but can't find it anywhere:
>>
>>What's the standard idiom for unpacking the first few items of an
>>iterable whose total length is unknown?
>>
>>Something like
>>
>>a, b, c, _ = myiterable
>>
>>where _ could eat up a variable number of items, in case I'm onl
terested in the first 3 items?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, December 13, 2012 3:09:58 PM UTC, Miki Tebeka wrote:
> On Thursday, December 13, 2012 7:03:27 AM UTC-8, Daniel Laird wrote:
>
> > I do am import unittest2 as unittest
>
> > NameError: global name 'assertListEqual' is not defined
>
> According t
All,
I am new to python and am stuck with python 2.6 (Ubuntu 10.04 and dont want to
force switch to 2.7)
I want to use assertListEqual and other new test functions.
However
I do am import unittest2 as unittest
The code does not fail but any use of the new functions results in:
NameError: global n
Hello,
I am new to Python. Is there a method to "join" two pipe delimited files using
a unique key that appears in both files? I would like to implement something
similar to the Unix join command.
Thanks for your help!
Topeka Capital Markets Disclaimers -
ht
mmon idiom
for this that does?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
With the assistance of this group I am understanding unicode encoding
issues much better; especially when handling special characters that are
outside of the ASCII range. I've got my application working perfectly now
:-)
However, I am still confused as to why I can only use one specific encoding.
If you try to expand any of the paths in the Path Browser (by clicking the +
sign) then it not only closes the Path Browser but it also closes all other
windows that were opened in IDLE, including the IDLE interpreter itself.
I did a Google search and it doesn't look like this been reported. If t
If you try to expand any of the paths in the Path Browser (by clicking the
+ sign) then it not only closes the Path Browser but it also closes all
other windows that were opened in IDLE, including the IDLE interpreter
itself.
A Google search doesn't look like this been reported. If this is truly a
Daniel Dehennin writes:
> Hello,
Hi
[...]
> I tried to setup the same for my scripts with
> "logging.config.dictConfig()" without much success, I want to limit
> output to stdout to INFO, everything bellow INFO should be sent to
> stderr instead.
>
> Any hints?
#x27; : 'logging.StreamHandler',
'stream' : 'ext://sys.stderr',
'level' : 'WARNING',
'formatter' : 'stderr', }
},
'root' : { 'level' : options.log_level.upper(),
'handlers' : ['stdout', 'stderr'],
},
}
logging.config.dictConfig( config )
return logging.getLogger()
#+end_src
Regards.
--
Daniel Dehennin
EOLE
pgpP128hCWd2L.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
x = [1,2,3]
y = [10,20,30]
x.extend( y )
print x
this will give you [1,2,3,10,20,30] which I guess is what you want.
Cheers,
Daniel
--
Psss, psss, put it down!
Hello rusi
This is a little bit faster:
s = "apple"
[s[i:i+2] for i in range(len(s)-1)]
>>> timeit("""s = "apple"
... [a+b for a,b in zip(s, s[1:])]""",number=1)
0.061038970947265625
>>> timeit("""s = "apple"
... [s[i:i+2] for i in range(len(s)-1)]""",number=1)
0.0467379093170166
Reg
On Thu, Oct 18, 2012 at 8:42 PM, Demian Brecht wrote:
>> str, bytes, bytearrays, arrays, sets, frozensets, dicts, dictviews, and
>> ranges should all return len in O(1) time. That includes the possibility
>> of a subtraction as indicated above.
>
> Awesome. Pretty much what I figured. Of course, I
programming, I'd start another projet first - I think you will have
>>> a tough way to succeed with this project.
>>
>> I certainly wouldn't start with Xlib in C, but if python bindings
>> would be available that would make life much easier.
>>
>
when you write that you have no experience with
> GUI programming, I'd start another projet first - I think you will have
> a tough way to succeed with this project.
I certainly wouldn't start with Xlib in C, but if python bindings
would be available that would make life much easier.
Cheers,
Daniel
> Christian
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
rk immediately with gtk from C.
But I have zero experience with gui programming in python. So any
pointers would be much appreciated how to implement a system tray in
python. Gtk is I guess just one option, one could use other stuff from
python but I wouldn't know what the simplest approach is.
Where would I start something like this?
Any pointers would be greatly appreciated!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday, October 3, 2012 5:40:12 PM UTC+1, Daniel Klein wrote:
> Thank you Steven! That was PRECISELY what I was looking for.
(And kwpolska!)
--
http://mail.python.org/mailman/listinfo/python-list
Thank you Steven! That was PRECISELY what I was looking for.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I've got import scripts for a bunch of csv files into an sqlite database. I
have one csv file per language. I don't write directly to the sqlite db; this
is a django app and I'm creating items in my django models.
My script (scripts, unfortunately) work just fine, but it feels beyond stupi
t;>>> [name for name in sys.modules if "abrt" in name.lower()]
> []
>
> gives a non-empty result I'd investigate where the culprit is imported --
> /usr/lib/python2.6/sitecustomize.py would be the obvious candidate.
Indeed! Thanks a lot,
/usr/lib/python2.6/si
e is that I have all sorts
of recent files in /var/cache/abrt/pyhook-* indicating that somehow
abrt is doing things even though it is not running, for instance
chkconfig --list | grep abrt shows it off in all run levels.
What's going on?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
alternatively you can use virtualenv to create virtual environments
http://www.virtualenv.org/en/latest/index.html
however, if what you want is automated generation of some of the code,
you can adopt an IDE or create some macros in your text editor of
choice.
From: alex23
Date: 24 Septem
and to the Django
community in general. Please pass on condolences to his family and friends.
--
Daniel.
--
http://mail.python.org/mailman/listinfo/python-list
turn x**i
>
> i = 3
> def f3(x): return x**i
>
> Is there any surprise that all three functions return the same value?
> They all point to the same global variable i. I'm not sure what it is
> about lambda that fools people into thinking that it is different (I've
> even been fooled myself!) but it is not.
Thank you Steve!
Precise and clear, as always!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
t;
>Try giving the lambda a default parameter (they get calculated and
> have their value stored at the time the lambda is defined) like this:
>funcs = [ lambda x, i=i: x**i for i in range( 5 ) ]
Thanks a lot!
I worked around it by
def p(i):
return lambda x: x**i
funcs = [ p(i) fo
> funcs = [ lambda x: x**i for i in range( 5 ) ]
> print funcs[0]( 2 )
> print funcs[1]( 2 )
> print funcs[2]( 2 )
>
> This gives me
>
> 16
> 16
> 16
>
> When I was excepting
>
> 1
> 2
> 4
>
> Does anyone know why?
And more importantly, what's the simplest way to achieve the latter? :)
--
Psss,
funcs = [ lambda x: x**i for i in range( 5 ) ]
print funcs[0]( 2 )
print funcs[1]( 2 )
print funcs[2]( 2 )
This gives me
16
16
16
When I was excepting
1
2
4
Does anyone know why?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org
The windows box is my development box, it's not where the script will be
running in the end. It'll be running on a Linux box where I don't have root so
python setup.py install isn't an option (to my understanding).
So what happened is that 7zip didn't unzip the .tar.gz2 properly, but it does
fi
]
>
> I wonder whether there can be a single list comprehension expression to get
> this
> result without the aid of the auxiliary function.
>
> Do you have any comments on this?
>>> l = [0,1,2,3,4,5,6,7,8,9]
>>> [n if n%2 else 100+n for n in l]
[100, 1, 102, 3, 104, 5, 106, 7, 108, 9]
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
like to.
>
> Can you be less condescending?
Of course! :)
Anyway, the point I was trying to make is that Steve's example is
kinda cool but only as a funny exercise and not something for real
life. Let's toy with python kinda thing, which is always welcome but
with a big fat aster
name__] = staticmethod(obj)
> else:
> raise TypeError('bad export')
> Namespace = type(func.__name__, (), ns)
> return Namespace()
>
>
> Have fun!
Funny, you got to the last line of "import this" but apparently
skipped the second line:
Explicit is better than implicit.
And you didn't even post your message on April 1 so no, I can't laugh
even though I'd like to.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel wrote:
> On Sun, May 13, 2012 at 2:29 PM, Alec Taylor
> wrote:
> > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].
>
> Ordered dict are useful, but they only remember the ordered in which
> they were add
/3.1/
> [2] http://www.python.org/getit/releases/2.7.3/
> [3] http://dl.acm.org/citation.cfm?id=645413.652131
>
> On Sat, May 12, 2012 at 10:17 PM, Jean-Daniel
> wrote:
>>
>> Hello,
>>
>> I have a long list of n date intervals that gets added or suppressed
&
ecision, you do not have to like that decision, you do not have to |
> | accept that decision.|
>
Again, if you don't like the lead developer just fork the project,
come up with a new name, new website
it fast is to have done some preprocessing at
insertion time, so that not all intervals are processed at query time.
On Sat, May 12, 2012 at 2:30 PM, Karl Knechtel wrote:
> On Sat, May 12, 2012 at 8:17 AM, Jean-Daniel
> wrote:
>> I am looking for a fast way to find the intervals
&
Hello,
I have a long list of n date intervals that gets added or suppressed
intervals regularly. I am looking for a fast way to find the intervals
containing a given date, without having to check all intervals (less
than O(n)).
Do you know the best way to do this in Python with the stdlib?
A var
nity, new
infrastructure, new fame, etc, and I sure as hell like to take the
easy road as opposed to the hard road".
Until you clearly explain your reasoning for taking over as opposed to
forking, the default answer is the above one.
Cheers,
Daniel
--
Psss, psss, put it down! - http
It's also quite ironic that the initial complaining started from how
the domain name www.pyjs.org is not available only pyjs.org is. At the
same time the Rebel Chief's listed domain name on github, see
https://github.com/xtfxme, gives you a server not found:
http://the.xtfx.me/ :)
On 5/9/12, ant
You could also try http://docs.python.org/library/stdtypes.html#str.join
like this:
for i in range(5):
print "".join(str(i) for j in range(i))
--
http://mail.python.org/mailman/listinfo/python-list
If you want it as an int:
random.randint(10, 99)
Or as a string:
s = '%06d' % random.randint(0, 99)
On Mon, Mar 26, 2012 at 2:08 AM, Nikhil Verma wrote:
> Hi All
>
> How can we generate a 6 digit random number from a given number ?
>
> eg:-
>
> def number_generator(id):
> rando
On 3/23/12, Sangeet wrote:
> Hi,
>
> I've got to fetch data from the snippet below and have been trying to match
> the digits in this to specifically to specific groups. But I can't seem to
> figure how to go about stripping the tags! :(
>
> Sum class="green">24511 align='center'>02561.496
> [min]
strip() removes leading and trailing characters, which is why the 't' in
the middle of the string was not removed. To remove the 't' in the
middle, str1.replace('t','') is one option.
On 3/22/12 3:48 PM, Rodrick Brown wrote:
#!/usr/bin/python
def main():
str1='this is a test'
str2=
A new release of markup.py is available at http://markup.sourceforge.net/
This new release is compatible with both python 2 and 3.
What is markup.py?
Markup.py is an intuitive, light weight, easy-to-use, customizable and
pythonic HTML/XML generator. The only goal is quickly writing HTML/XML
segm
of digits for the value that makes sense for
the given error. So what you call "non sense" is part of the problem
to be solved.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
guess, it's failing because scaleb() (which was new in
> 2.6) is buggily expecting a decimal argument, but adjusted() returns an int.
> Convert the results of the two adjusted() calls to decimals, and I
> think it should be fine.
Great, with python 2.7 it works indeed!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
On 2/16/12, Ian Kelly wrote:
> On Thu, Feb 16, 2012 at 1:36 AM, Daniel Fetchinson
> wrote:
>>>> Hi folks, often times in science one expresses a value (say
>>>> 1.03789291) and its error (say 0.00089) in a short way by parentheses
>>>> like so: 1.0379(9
le).to_integral()
> if 'E' in value_str:
> index = value_str.index('E')
> return value_str[:index] + error_str + value_str[index:]
> else:
> return value_str + error_str
>
>>>> format_error(1.03789291, 0.00089)
> &
value correspondingly. I've been searching around for a simple
function that would take 2 float arguments and would return a string
but didn't find anything although something tells me it's been done a
gazillion times.
What would be the simplest such function?
Cheers,
Daniel
--
Pss
r
-> the function name also comes with a leading underscore '_', i.e.
"_initfoo", not "initfoo"
Could someone knowledge with Windows and MinGW help me to sort this out? Tools
used: cmake-2.8.3, mingw-? with gcc-4.4 and Python-2.7.2 from python.org.
Thanks
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
On Saturday 14 January 2012 22:15:36 Daniel Franke wrote:
> Here I'd expect "" instead?! And I never managed a proper
> subclass :|
Found an explanation on type/class at [1]: "he difference between the two is
whether the C-level type instance structure is flagged as hav
x27;d like
to subclass "cb" not from "ca", but from the Python "class A" - if possible?!
Could somepne kindly point out my mistake(s) and set me back on track?
Thanks
Daniel
--
#include
typedef struct {
PyObject_HEAD
} ca;
static PyTypeObject ca_Type
We've a bunch of windows servers stuck on python 2.5 since an API we use on
them is shipped to us pyc's only - forcing us to stay with that version. Most
of our other machines are on 2.6 or 2.7.
-Original Message-
From: testing-in-python-boun...@lists.idyll.org
[mailto:testing-in-pytho
Thanks a million Oleg!
Cheers,
Daniel
On 11/20/11, Oleg Broytman wrote:
> Hello!
>
> I'm pleased to announce version 1.2.0, the first stable release of branch
> 1.2 of SQLObject.
>
>
> What is SQLObject
> =
>
> SQLObject is an object-relationa
Okey i figure it out how to do the job in fedora
i added slight delay before sending each command
either by the delaybeforesend attribute or by the time module
;)
cheers
On Wed, 2011-10-05 at 14:47 +0200, Nizamov Shawkat wrote:
> 2011/10/5 Daniel <5960...@gmail.com>:
> > Hello
this feature has been removed in python3 in accordance to the PEP 3113
(http://www.python.org/dev/peps/pep-3113/), you should consider using the *
operator
http://docs.python.org/tutorial/controlflow.html#unpacking-argument-lists .
--
http://mail.python.org/mailman/listinfo/python-list
there is no such implementation in fedora you can su as a root .. i can
su from regular user to root with no problems
the problem come when i use the pexpect module
On Wed, 2011-10-05 at 14:47 +0200, Nizamov Shawkat wrote:
> 2011/10/5 Daniel <5960...@gmail.com>:
> > Hello,
>
Hello,
For about week i am experiencing a problem with pexpect that's why i
hope you can help me :).
Following is my code which tries to remove some files from the root dir
and the code works on linux debian and freebsd but with no success on
linux fedora .. any idea why this happen only in fedora
Hello,
For about week i am experiencing a problem with pexpect that's why i
hope you can help me :).
Following is my code which tries to remove some files from the root dir
and the code works on linux debian and freebsd but with no success on
linux fedora .. any idea why this happen only in fedora
I thought a bit about Carl's and Thomas' proposals, and it gave me an
idea how this problem could be approached:
Break is relatively easy to implement with a context manager that
returns an iterable that throws an exception specific to that context
manager:
with named_loop(i for i in range(10)) as
Hi Steve,
Thanks for your comments, I appreciate any input.
> Do you think the software in the Apple iPod is "simple"? Or Microsoft
No, that's much more complicated that what I am doing.
But the iPod probably (?) doesn't get new algorithms based on a
specification discussed with non-programmers on
> Do you only ever have one top-level loop that you would be naming? If
no, unfortunately not. The rough structure is several loops deep, and
I need to break/continue/restart many of them.
Continue is used more than break, because most of the time that I find
some strange value, I'd just _continue
> one more idea, a kind of named loop:
interesting idea, thanks.
>
> When it become too complicate, I use state
> machine:http://en.wikipedia.org/wiki/Finite-state_machine
I unsuccessfully played a bit with a FSM, but there is a lot of data
that is passed around between the states and a lot of
Dear All,
I have some complicated loops of the following form
for c in configurations: # loop 1
while nothing_bad_happened: # loop 2
while step1_did_not_work: # loop 3
for substeps in step1 # loop 4a
# at this point, we may have to
-leave lo
I'll be 59 in a couple of months.
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
On Sunday, 14 August 2011 03:20:30 UTC+1, John Gordon wrote:
> I'm devleoping a website using the Django framework along with Apache,
> and I'm seeing some odd data issues.
>
> During the course of navigating through the website content, a user
> will cause the creation of some data records with
Something like this already exists:
a = 0
b = 1
if (True == True
and False == False
and a + 1 == b
and b - 1 == a):
print 'meh'
So I've got no idea what this proposal is about except for the
dropping of readability of Python.
-1
Daniel Greenfeld
different performance characteristics, and a
sorteddict works just like a dict but keeps the keys sorted.
--
Daniel Stutzbach
--
http://mail.python.org/mailman/listinfo/python-list
d into Python source code?
>
Seems unlikely.
--
Daniel Stutzbach
--
http://mail.python.org/mailman/listinfo/python-list
f dreamhost and webfaction
>> does anyone have any recent experiences with these two? Or others?
>>
>> Cheers,
>> Daniel
>>
>
> Hi Daniel,
>
> I can wholeheartedly recommend WebFaction. I currently have an account
> running 3 different CherryPy applications
e have any recent experiences with these two? Or others?
Cheers,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
precated as of Python 2.7. Please switch to the new Capsules
API." which is of no concern here :)
Thanks heaps!
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
get a reasonable
solution working for 2.[567], I might as well go back to
Py_InitModule() and static variables. It's somewhat ugly, but it
works.
Thanks for the info!
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Here, of course, the functions PyObjectFromRawPointer(void*) and void*
PyRawPointerFromPyObject(PyObject*) are missing. Is there anything
like this in the Python C-API? If not, how could it be implemented? Or
is this approach a stupid idea to begin with? Pointers would be highly
appreciated.
Thanks
world')
hello world
In future, please include full tracebacks and python version info.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
or your own app.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
from it.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
; (http://www.geek.com/articles/gadgets/dreamplug-puts-a-1-2ghz-arm-pc-in-a-power-outlet-2011022/)
> which isn't too shabby but I wonder if it will work.
The netbook I use with fedora linux and basically every major python
release from 2.4 to 3.2 has more limited resources :)
So yes, python wo
est regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Am 15.06.2011 14:29, schrieb Olivier LEMAIRE:
Hi there, I've been looking for 2 days for a way to convert integer
to binary number 0-padded, nothing... I need to get numbers converted
with a defined number of bits. For example on 8 bits 2 = 0010
bin(2)[2:].zfill(8)
Regards
D
ink this is the mentioned bug:
http://bugs.python.org/issue1294232
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
s exec to create new function, with
signature of function you pass to your decorator, so it does not
matter what names you used for args in decorator itself.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
xt))
Use UnicodeText instead of Text.
> A_record = A_class('BUM', 'Bäumer')
If this is python2.x, use u'Bäumer' instead.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
ords=None, defaults=None)
So this decorator achieves needed result and preserves function signatures.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
/getitem can modify object too if
class overrides them).
Obviously it would not save you from functions which use
global/globals() or some other ways to change state outside their
scope.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
n
use map(lambda x: , list_of_x), and you will have your
isolated scopes. Although due to lambdas supporting only expressions,
following this style leads to awkward and complicated code (and/or
instead if, map instead for, and so on).
--
With best regards,
Daniel Kluev
--
http://mail.python.org/
hon.
On a sidenote, I wonder what is the reason to keep word 'variable' in
python documentation at all. I believe word 'name' represents concept
better, and those, who come from other languages, would be less likely
to associate wrong definitions with it.
--
With best regards,
101 - 200 of 1816 matches
Mail list logo