satishmlm...@gmail.com wrote:
> What does %%(%s)s mean in Python?
According to
https://docs.python.org/2/library/stdtypes.html#string-formatting
in an expression like
"%%(%s)s" % ("foo",)
'%%' expands to '%' and
'%s' expands to 'foo'
so the whole thing gives
>>> "%%(%s)s" % ("foo",)
'%(f
Am 29.10.14 07:15, schrieb satishmlm...@gmail.com:
What does %%(%s)s mean in Python?
Instead of posting all those questions here, you can simply try it in an
interactive python interpreter:
Apfelkiste:VecTcl chris$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Ap
On 29/10/2014 05:48, satishmlm...@gmail.com wrote:
kindly let me know
what does
%%(%s)% mean
What did you not understand from the link I posted ten hours ago?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://m
Hi
Consider the following to_bytes method from integer class:
int.to_bytes(length, byteorder, *, signed=False)
What doest the '*' in the arguments list means ?
--
https://mail.python.org/mailman/listinfo/python-list
ast wrote:
> Consider the following to_bytes method from integer class:
>
> int.to_bytes(length, byteorder, *, signed=False)
>
> What doest the '*' in the arguments list means ?
A bare * indicates that the arguments that follow it are keyword-only:
>>> def f(a, b=2, *, c=3):
... print("a =
On 29/10/2014 02:18, Denis McMahon wrote:
> On Mon, 27 Oct 2014 10:16:43 -0700, kiuhnm03 wrote:
>
>> I'd like to write one or more scripts that analyze processes in memory
>> on Windows 7. I used to do these things in C++ by using native Win32 API
>> calls.
>> How should I proceed in python? Any p
"Peter Otten" <__pete...@web.de> a écrit dans le message de
news:mailman.15291.1414574006.18130.python-l...@python.org...
A bare * indicates that the arguments that follow it are keyword-only:
ok, thx
--
https://mail.python.org/mailman/listinfo/python-list
Let's say I have an incoming list of values *l*. Every element of *l* can be
one of the following options:
1) an integer value
2) a string in form of '', e.g. '7'
3) a string with a json serialization of an integer value, e.g. '"7"'
4) something else that should be ignored
I need to transform th
On 10/29/14 2:02 AM, satishmlm...@gmail.com wrote:
def fetchRecord(db, form):
try:
... 34 lines deleted ...
db.close()
print(replyhtml % htmlize(fields))
Why did you paste all this code, it doesn't have the thing you are
asking about.
What does %%(%s)s mean in Python?
It depends e
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 29/10/2014 10:45, Anton wrote:
> Let's say I have an incoming list of values *l*. Every element of
> *l* can be one of the following options: 1) an integer value 2) a
> string in form of '', e.g. '7' 3) a string with a json
> serialization of an int
Hi, first in Python 2.7.6 and Python 3.4.0 list haven't got any add
function but they have append.
I think you could do better with something like
==
import json
l = [1, -1, 0, '1', '-1', '0', json.dumps(-1), json.dumps(1),
json.dumps(0), 'x', 'sqjklsqjk__', (1, 2)]
values = []
for c in
2014-10-29 12:25 GMT+01:00 Martin Kemp :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 29/10/2014 10:45, Anton wrote:
>> Let's say I have an incoming list of values *l*. Every element of
>> *l* can be one of the following options: 1) an integer value 2) a
>> string in form of '', e.g. '7
Where is DIRECTORY_ENTRY_LOAD_CONFIG?
In the changelog (https://code.google.com/p/pefile/) one can read:
"Version: 1.2.10-60
Besides some small bugfixes in this release I've added functionality to
parse the LOAD_CONFIG data directory. Now one can access this structure's
fields like, for ins
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 29/10/2014 12:01, Rafael Romero Carmona wrote:
> 2014-10-29 12:25 GMT+01:00 Martin Kemp : On
> 29/10/2014 10:45, Anton wrote:
Let's say I have an incoming list of values *l*. Every
element of *l* can be one of the following options: 1) an
On 29/10/2014 13:15, gandal...@mail.com wrote:
> Where is DIRECTORY_ENTRY_LOAD_CONFIG? In the changelog
> (https://code.google.com/p/pefile/) one can read:
>
> "Version: 1.2.10-60
>
> Besides some small bugfixes in this release I've added functionality
> to parse the LOAD_CONFIG data directory. N
On Tue, Oct 28, 2014 at 4:01 PM, Ned Deily wrote:
> In article
> ,
> Cyd Haselton wrote:
>
>> On Tue, Oct 28, 2014 at 3:11 AM, Ned Deily wrote:
>> > In article
>> > ,
>> > Cyd Haselton wrote:
>> > [...]
>> >> I'm building python on an Android device in the KBOX
>> >> environment...which simul
On 28/10/14 07:42, ngangsia akumbo wrote:
> Please can someone look at my code and may be advice and may be help me with
> some correction. I have been learning python for some time now. This is my
> first project i wish to write. A hotel management system.
>
>
> http://pastebin.com/LMHmuTiC
B
Can i emulate py2exe for python version 3 and above i also use pygame any
suggestions for a basic staring script would be greatly appreciated
Thanks
Ian
--
https://mail.python.org/mailman/listinfo/python-list
Am 29.10.2014 07:02 schrieb satishmlm...@gmail.com:
What does %%(%s)s mean in Python?
Weird question, as this has nothing to do with the code you just posted.
In general, what comes up to my mind, is that it is a format string to
build another format string.
Example:
metafmt = '%%(%s)s'
f
How do you send a UDP frame to an IPv6 link-local address?
Initially, I'm most concerned with Linux.
I'm using CPython 2.7.7, but so far all behavior seems to be identical
under 3.3.5, and I need to keep my code compatible with both 2.7 and
3.3/3.4.
I'm particularly interested in sending to the
On Wednesday, October 29, 2014 2:39:30 PM UTC+1, Tim Golden wrote:
> On 29/10/2014 13:15, gandalf23 wrote:
> > Where is DIRECTORY_ENTRY_LOAD_CONFIG? In the changelog
> > (https://code.google.com/p/pefile/) one can read:
> >
> > "Version: 1.2.10-60
> >
> > Besides some small bugfixes in this relea
Little test...sorry.
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, October 29, 2014 4:34:42 PM UTC+1, Kiuhnm wrote:
> OT: how can I hide my email in these posts?
> Every time I try to send a post, google warns me that my email is visible and
> so I edit it out.
Problem solved :)
--
https://mail.python.org/mailman/listinfo/python-list
I must say that the lack of static types in Python is a pain in the neck
especially when I'm exploring new libraries.
Recently, I learned a new language called Dart which have optional typing and I
had a lot of fun with it. Basically, you use type annotations as documentation
and to give useful
Grant Edwards writes:
[...]
> With link-local addresses you also need to specify which interface to
> use. The normal way of doing this on Linux with command-line utilities
> is append % to the address/hostname (e.g. ping6 ff02::1%net1).
>
> That doesn't work:
>
> s.sendto(data, ("ff02::1%net1",p
Kiuhnm wrote:
> I must say that the lack of static types in Python is a pain in the neck
> especially when I'm exploring new libraries. Recently, I learned a new
> language called Dart which have optional typing and I had a lot of fun
> with it. Basically, you use type annotations as documentation
On Wednesday, October 29, 2014 5:57:13 PM UTC+1, Peter Otten wrote:
> Kiuhnm wrote:
>
> > I must say that the lack of static types in Python is a pain in the neck
> > especially when I'm exploring new libraries. Recently, I learned a new
> > language called Dart which have optional typing and I ha
On Thu, Oct 30, 2014 at 4:18 AM, Kiuhnm wrote:
>> Personally I am skeptical, but there is an effort underway:
>>
>> http://www.mypy-lang.org/
>> https://mail.python.org/pipermail/python-ideas/2014-August/028742.html
>>
>> Nothing that your search engine of choice could not have found you...
>
> In
On 2014-10-29, Alain Ketterlin wrote:
> Grant Edwards writes:
>
> [...]
>> With link-local addresses you also need to specify which interface to
>> use. The normal way of doing this on Linux with command-line utilities
>> is append % to the address/hostname (e.g. ping6 ff02::1%net1).
>>
>> That d
On 10/29/2014 10:18 AM, Kiuhnm wrote:
On Wednesday, October 29, 2014 5:57:13 PM UTC+1, Peter Otten wrote:
Kiuhnm wrote:
I must say that the lack of static types in Python is a pain in the neck
especially when I'm exploring new libraries. Recently, I learned a new
language called Dart which hav
On Thu, Oct 30, 2014 at 4:46 AM, Ethan Furman wrote:
> Even if it becomes official, which seems likely, it will still be optional
> -- hence, only useful if folks actually use it. ;)
Yes, but if it's official, the standard library (large parts of it, at
least) will use it, which will make it a l
On Mon, 27 Oct 2014 08:10:04 -0700, emmanueloje wrote:
> Write a program ...
Hey dudester
I coded a solution for you, you can get it here:
http://www.sined.co.uk/tmp/names.py.txt
Make sure you leave all the comments in so your instructor realises how
much effort you went in to in researching
Chris Angelico :
> Yes, but if it's official, the standard library (large parts of it, at
> least) will use it, which will make it a lot more useful than it
> currently is.
I doubt it. Python should decide if it wants to stay Python or become
another Java. I don't really believe in this "be every
On Thu, Oct 30, 2014 at 5:18 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Yes, but if it's official, the standard library (large parts of it, at
>> least) will use it, which will make it a lot more useful than it
>> currently is.
>
> I doubt it. Python should decide if it wants to stay Python
> Am I the only one who'd like to see optional types introduced in Python?
Nope! Some dude named "Guido" would like to see them as well:
https://mail.python.org/pipermail/python-ideas/2014-August/028742.html
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, October 29, 2014 7:19:11 PM UTC+1, Marko Rauhamaa wrote:
> Chris Angelico :
>
> > Yes, but if it's official, the standard library (large parts of it, at
> > least) will use it, which will make it a lot more useful than it
> > currently is.
>
> I doubt it. Python should decide if it
Kiuhnm :
> 2) Having optional types is not "being everything for everybody", it's
> just being smart.
We'll see, we'll see...
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, October 29, 2014 4:43:33 AM UTC-7, Rafael Romero Carmona wrote:
> Hi, first in Python 2.7.6 and Python 3.4.0 list haven't got any add
> function but they have append.
You are right, in my original code I use set instead of array, so it should be
either values = set() or values.append
On Wednesday, October 29, 2014 8:03:16 PM UTC+1, Kiuhnm wrote:
> On Wednesday, October 29, 2014 7:19:11 PM UTC+1, Marko Rauhamaa wrote:
> > Chris Angelico :
> >
> > > Yes, but if it's official, the standard library (large parts of it, at
> > > least) will use it, which will make it a lot more usef
On 29/10/2014 19:03, Kiuhnm wrote:
On Wednesday, October 29, 2014 7:19:11 PM UTC+1, Marko Rauhamaa wrote:
Chris Angelico :
Yes, but if it's official, the standard library (large parts of it, at
least) will use it, which will make it a lot more useful than it
currently is.
I doubt it. Python
On Wednesday, October 29, 2014 4:59:25 AM UTC-7, Rafael Romero Carmona wrote:
> 2014-10-29 12:25 GMT+01:00 Martin Kemp :
> Actually it doesn't work because there is no add function and it
> doesn't catch the TypeError function to ignore other exceptions than
> ValueError. Doesn't it? I tested in Py
Ned Batchelder schrieb am 26.10.2014 um 21:45:
> On 10/26/14 4:07 PM, Tony the Tiger wrote:
>> On Wed, 22 Oct 2014 10:27:34 +0200, ast wrote:
>>
>>> If i am writing (-1)**1000 on a python program, will the interpreter do
>>> (-1)*(-1)*...*(-1) or something clever ?
>>
>> Even vs. odd. It ought to k
Mark Lawrence :
> Regarding 2) Python has somehow managed without optional types for
> over 20 years so it's my belief that they're not the panacea that so
> many people think they are. Sure if they get implemented and if they
> improve Python then I'm all for them, but I'm not holding my breath.
On Wednesday, October 29, 2014 8:45:08 PM UTC+1, Marko Rauhamaa wrote:
> Mark Lawrence :
>
> > Regarding 2) Python has somehow managed without optional types for
> > over 20 years so it's my belief that they're not the panacea that so
> > many people think they are. Sure if they get implemented an
On Wednesday, October 29, 2014 8:23:30 PM UTC+1, Mark Lawrence wrote:
> On 29/10/2014 19:03, Kiuhnm wrote:
> > On Wednesday, October 29, 2014 7:19:11 PM UTC+1, Marko Rauhamaa wrote:
> >> Chris Angelico :
> >>
> >>> Yes, but if it's official, the standard library (large parts of it, at
> >>> least)
It only occurs whule using PyCharm I tried it via pure terminal and
everything works... =/
On Tue, Oct 28, 2014 at 7:45 PM, Juan Christian
wrote:
> Python 3.4.2 Windows x64
> PyQt4 4.11.2 Py3.4 Qt4.8.6 (x64)
> PyCharm 3.4.1 Pro Edition
>
>
> So, PyCharm works 100% with everything here but PyQt.
On Tuesday, October 28, 2014 10:13:14 PM UTC-7, Gregory Ewing wrote:
> No, that's not the correct answer. Being NP-complete doesn't
> mean something is impossible, or even hard to do. All it
> means is that nobody knows of a cleverer solution than
> just trying all possibilities. That's only a diff
On 10/29/2014 1:42 AM, Zachary Ware wrote:
to avoid inconvenient line-wrapping (that I can avoid just by
sticking to 80 column lines in the first place:).
Try perhaps 65 for email.
def get_abc_map(cls):
return {n: issubclass(cls, getattr(abc, n))
for n in dir(abc) if n[0].isupp
On 10/29/2014 4:56 AM, ast wrote:
Consider the following to_bytes method from integer class:
int.to_bytes(length, byteorder, *, signed=False)
What doest the '*' in the arguments list means ?
If you go to the online doc index page for Symbols,
https://docs.python.org/3/genindex-Symbols.html
the
On 10/29/2014 4:40 PM, Kiuhnm wrote:
The only thing I know is that I programmed in ASM and C++ for many
years and I liked it. Then I moved to C#, Haskell, Scala, and many
other languages. Then I learned Python and I liked it. Then I tried
Dart (with optional static typing) and liked it very much
50 matches
Mail list logo