On Tuesday, August 19, 2014 7:15:54 PM UTC+2, Rustom Mody wrote:
> On Tuesday, August 19, 2014 10:31:03 PM UTC+5:30, Laurent Pointal wrote:
>
> > raphinou wrote:
>
>
>
> > > Hi,
>
> > > I'm using pyyaml, and need some values in a yaml files to be dynamic,
>
> > for
>
> > > example somethin
luofeiyu writes:
> would you mind sending the video to my mailbox?
Please, remember to post interleaved style. Don't top-post.
> There is no video in the web when i open it in my firefox.
The page describing the video also has a link to the hosted site of the
video, see the “Video origin” fiel
would you mind sending the video to my mailbox?
There is no video in the web when i open it in my firefox.
think you in advance.
Even with perfect knowledge, you can't always do that. There are
points on the globe which use two timezones. :)
http://pyvideo.org/video/1765/blame-it-on-caesar-
On Wednesday, August 20, 2014 10:29:13 AM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 19 Aug 2014 21:01:49 -0700, Rustom Mody wrote:
> > I also (once!) had a student who started every single
> > variable/function/filename with his name!!
> I recall somebody on the Python tutor mailing list doing t
On Wed, 20 Aug 2014 11:05:26 +0800, luofeiyu wrote:
import inspect
> >>> def changer(x,y):
> ... return(x+y)
The interactive interpreter doesn't store the source code you type. It
compiles it to byte-code, executes the byte-code, and throws the source
code away.
--
Steven
--
http
On Tue, 19 Aug 2014 21:01:49 -0700, Rustom Mody wrote:
> I also (once!) had a student who started every single
> variable/function/filename with his name!!
I recall somebody on the Python tutor mailing list doing that. They did
so because their course instructor made it a requirement and failed
On Wednesday, August 20, 2014 1:08:17 AM UTC+8, Kushal Kumaran wrote:
> On Tue, Aug 19, 2014 at 1:09 PM, yuzhichang wrote:
>
> > Hi all,
>
> > I'm new to asyncio introduced by Python 3.4. I created two tasks each
> > pings a host. I noticed some pieces of output will be lost(see "error:
>
On Wednesday, August 20, 2014 4:54:00 AM UTC+5:30, Ben Finney wrote:
> Tim Chase writes:
> > Am I the only one who feels the urge to write
> > if i am some_other_object: ...
> > if we are some_other_object: ...
> > if u are some_other_object: ... # though txtspk bothers me
> How often do yo
luofeiyu writes:
> >>> import inspect
> >>> def changer(x,y):
> ... return(x+y)
> ...
At this point, you have defined a function. It is accessible via the
‘changer’ name, and the code is available.
But the source code is not available; Python reads standard input but
doesn't preserve it.
>
>>> import inspect
>>> def changer(x,y):
... return(x+y)
...
>>> dir()
['__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__
'changer', 'inspect']
>>> inspect.getsource(changer)
Traceback (most recent call last):
File "", line 1, in
File "D:\Python34\lib\inspect.py", l
luofeiyu writes:
> >>> tz1
>
> >>> repr(tz1)
> ""
Yes. Remember that ‘repr’ is for the benefit of the programmer, and
there is no promise of what it contains.
> >>> x=repr(tz1)
> >>> x
> ""
> >>> import re
> >>> re.search("LMT.+\s",x).group()
> 'LMT+8:06:00 '
This is wildly fragile. The ‘repr
>>> tz1
>>> repr(tz1)
""
>>> x=repr(tz1)
>>> x
""
>>> import re
>>> re.search("LMT.+\s",x).group()
'LMT+8:06:00 '
i got it ,thinks to all my friends .
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Aug 19, 2014 at 5:05 PM, Dan Stromberg wrote:
> When you use heapq, are you putting all the values in the heap, or
> just up to n at a time (evicting the worst value, one at a time as you
> go)? If you're doing the former, it's basically a heapsort which
> probably won't beat timsort. If
"Gary Furash" wrote in message
news:135759bf-0823-480c-9631-106d6cf1a...@googlegroups.com...
I need to be able to access Oracle from both Windows and *nix, however, it
seems kind of tortuous getting everything working each time on each server.
With Java I can just drop (usually the same) JDBC
Shubham Tomar writes:
> Lets say I have a function poker(hands) that takes a list of hands and
> returns the highest ranking hand, and another function hand_rank(hand)
> that takes hand and return its rank.
To make it clearer, I think you mean something like this::
def hand_rank(hand):
On Wed, Aug 20, 2014 at 9:08 AM, Cameron Simpson wrote:
> there is no way to go from a physcial point of the surface of the Earth to
> the timezone mapping name that should be used. (Using only the Olsen
> timezone db.)
Even with perfect knowledge, you can't always do that. There are
points on th
Tim Chase writes:
> Am I the only one who feels the urge to write
>
> if i am some_other_object: ...
> if we are some_other_object: ...
> if u are some_other_object: ... # though txtspk bothers me
How often do you need to refer to an object with personal pronouns? I
think for me the answer
On Tue, Aug 19, 2014 at 4:10 PM, Dan Stromberg wrote:
> On Tue, Aug 19, 2014 at 4:05 PM, Dan Stromberg wrote:
>> When you use heapq, are you putting all the values in the heap, or
>> just up to n at a time (evicting the worst value, one at a time as you
>> go)? If you're doing the former, it's b
On 19Aug2014 09:31, luofeiyu wrote:
My dear friends here, all i want is get ` LMT+8:06:00` from the
output of tz1 ``
Shall we get back to the main point?
That didn't seem to be your main point. You seemed to want to get Asia/Urumqi
time by either natural longituide or by Beijing Time,
On Tue, Aug 19, 2014 at 4:05 PM, Dan Stromberg wrote:
> When you use heapq, are you putting all the values in the heap, or
> just up to n at a time (evicting the worst value, one at a time as you
> go)? If you're doing the former, it's basically a heapsort which
> probably won't beat timsort. If
On 18 August 2014 04:28 "luofeiyu"
The land area of China is 60-degree longitude from west to east. According
to the demarcation of the world time zoning standard,
the land area of China lies between the eastern fifth to ninth time zones,
there are 5 time zones in china in fact.
Currently, al
On Tue, Aug 19, 2014 at 12:37 PM, Chiu Hsiang Hsu wrote:
> On Tuesday, August 19, 2014 5:42:27 AM UTC+8, Dan Stromberg wrote:
>> On Mon, Aug 18, 2014 at 10:18 AM, Chiu Hsiang Hsu wrote:
>>
>> > I know that Python use Timsort as default sorting algorithm and it is
>> > efficient,
>>
>> > but I ju
Ian Kelly :
> On Tue, Aug 19, 2014 at 3:00 PM, Marko Rauhamaa wrote:
>> For a more worthy attempt, we'll have to take a look at Scheme (> http://www.scheme.com/tspl2d/objects.html>):
>
> Those are invariants, not a definition. The actual definition is
> found in the paragraph above:
>
> "In most
On 19/08/2014 22:59, Terry Reedy wrote:
On 8/19/2014 12:35 PM, Laurent Pointal wrote:
wxjmfa...@gmail.com wrote:
Py3: It may luckily work, Python may crash or fails (it raises
unicode errors on valid string!).
Py2: It is safer and solid.
The truth is that 2.7 has many unicode bugs that hav
Le 20/08/2014 00:11, Alex Murray a écrit :
Hi,
I've discovered some very strange behaviour when trying to delete a
QWidget from a QGridLayout. The following code demonstrates this
behaviour:
>>> from PyQt4 import QtGui
>>> import sys
>>> app = QtGui.QApplication(sys.argv)
>>> grid_layout = QtG
On Wed, Aug 20, 2014 at 7:44 AM, Terry Reedy wrote:
> Whoops, I pasted the wrong (which is to say, correct) output.
> The right (worse incorrect) interactive output is
>
> U+20AC is is 0x80 in CP-1252
> The console interpreter gives me
> u"U+20AC is ? is 0x80 in CP-1252"
Ah! You had me highly con
I need to be able to access Oracle from both Windows and *nix, however, it
seems kind of tortuous getting everything working each time on each server.
With Java I can just drop (usually the same) JDBC library files in a location
and everything works. I'm sure there's some easier way of doing thi
On 8/19/2014 3:05 PM, Mark Lawrence wrote:
On 19/08/2014 19:26, Steven D'Aprano wrote:
Marko Rauhamaa wrote:
CPython implementation detail: This is the address of the object
in memory.
I really wish CPython didn't do that, or at least not admit to it. It
does
nothing but conf
On Tue, Aug 19, 2014 at 3:00 PM, Marko Rauhamaa wrote:
> For a more worthy attempt, we'll have to take a look at Scheme ( http://www.scheme.com/tspl2d/objects.html>):
Those are invariants, not a definition. The actual definition is
found in the paragraph above:
"In most Scheme systems, two obje
Hi,
I've discovered some very strange behaviour when trying to delete a QWidget from a QGridLayout. The following code demonstrates this behaviour:
>>> from PyQt4 import QtGui
>>> import sys
>>> app = QtGui.QApplication(sys.argv)
>>> grid_layout = QtGui.QGridLayout()
>>> grid_layout.addW
On 8/19/2014 3:37 PM, Chiu Hsiang Hsu wrote:
On Tuesday, August 19, 2014 5:42:27 AM UTC+8, Dan Stromberg wrote:
On Mon, Aug 18, 2014 at 10:18 AM, Chiu Hsiang Hsu
wrote:
I know that Python use Timsort as default sorting algorithm and
it is efficient,
Especially with data that is partially or
On 8/19/2014 12:35 PM, Laurent Pointal wrote:
wxjmfa...@gmail.com wrote:
Py3: It may luckily work, Python may crash or fails (it raises
unicode errors on valid string!).
Py2: It is safer and solid.
The truth is that 2.7 has many unicode bugs that have been fixed in in
various 3.x releases.
On 8/19/2014 4:05 AM, Furqan wasi wrote:
Please post plain text instead of html.
path and name , i need some help to in how to make library
libsndfile/Sndfile to read file with special character in it i.e
C:\Users\Furqan\Desktop\test\查找問題daw\查找問題d.wav, as i mentioned
in my first email
Use 3.
On 8/19/2014 5:23 AM, Chris Angelico wrote:
On Tue, Aug 19, 2014 at 7:03 PM, Terry Reedy wrote:
On 8/18/2014 7:44 PM, Chris Angelico wrote:
u"U+20AC is € is 0x80 in CP-1252"
u'U+20AC is \x80 is 0x80 in CP-1252'
Better than what I get on my 3.4.1 Win7
U+20AC is € is 0x80 in CP-1252
How
Jamie Mitchell writes:
> You were right Christian I wanted a shape (2,150).
>
> Thank you Rustom and Steven your suggestion has worked.
>
> Unfortunately the data doesn't plot as I imagined.
>
> What I would like is:
>
> X-axis - hs_con_sw
> Y-axis - te_con_sw
> Z-axis - Frequency
>
> What I woul
Marko Rauhamaa :
> That's circular reasoning. When you are defining Python's execution
> model, you can't refer back to Python's execution model.
>
> For a good example of what I'm after, take a look how Java specifies its
> crucial happens-before relation:
>
>http://docs.oracle.com/javase
On Tuesday, August 19, 2014 5:42:27 AM UTC+8, Dan Stromberg wrote:
> On Mon, Aug 18, 2014 at 10:18 AM, Chiu Hsiang Hsu wrote:
>
> > I know that Python use Timsort as default sorting algorithm and it is
> > efficient,
>
> > but I just wanna have a partial sorting (n-largest/smallest elements).
>
On Tue, 19 Aug 2014 05:54:24 -0700, Jurgens de Bruin wrote:
> I do hope somebody can help me with the following:
> I have the followings lists which represent the upper and lower value of
> a range/array.
>
> a = [1,50]
> b = [75,150]
> c = [25,42]
> d = [120,149]
> e = [35,55]
I think you're st
On 19/08/2014 19:26, Steven D'Aprano wrote:
Marko Rauhamaa wrote:
CPython implementation detail: This is the address of the object
in memory.
I really wish CPython didn't do that, or at least not admit to it. It does
nothing but confuse people.
I agree and would happily sup
On Tue, Aug 19, 2014 at 10:09 AM, Shubham Tomar
wrote:
> Lets say I have a function poker(hands) that takes a list of hands and
> returns the highest ranking hand, and another function hand_rank(hand) that
> takes hand and return its rank. As in Poker
> http://www.pokerstars.com/poker/games/rules
Steven D'Aprano :
> Python identity is represented by an integer, and it is guaranteed to
> be unique and constant for the lifetime of the object. It may or may
> not be reused once the object no longer exists. That's all you need to
> know about identity; that's *all there is to know* about ident
On Tue, Aug 19, 2014 at 11:42 AM, Ian Kelly wrote:
> When I need to do this, I use:
>
> SENTINEL = object()
>
> It's still a singleton, and why should a sentinel be mutable?
Old habits die hard, I guess. I've been using Python since long before
object() existed. :-)
Skip
--
https://mail.pyt
On Tue, Aug 19, 2014 at 1:09 PM, yuzhichang wrote:
> Hi all,
> I'm new to asyncio introduced by Python 3.4. I created two tasks each
> pings a host. I noticed some pieces of output will be lost(see "error: found
> icmp_seq gap"). If I changed to run only one task, this problem never occur.
>
Hi,
I made a fast implementation (I'm sure that can be done better) but it
works (for what I understood).
Is tested in Python3.4, if you will execute in Python 2.x, or don't have
mypy or don't like it, you always can remove the function annotations :)
http://gist.github.com/rockneurotiko/017044d
Marko Rauhamaa wrote:
> Skip Montanaro :
>
>> The use of "is" or "is not" is the right thing to do when the object
>> of the comparison is known to be a singleton.
>
> Object identity stirs a lot of passions on this forum. I'm guessing the
> reason is that it is not defined very clearly ( https:
Tim Chase :
> Note that a lifetime can be less than a statement:
>
id([1,2,3]) == id([4,5,6])
> True
Duly noted.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
>
> Maybe http://pandas.pydata.org/ ???
>
>
Thanks. This reply is like that butterfly wing flap causing hurricanes a world
away; big steerage away from proprietary stuff used in my org. Detox will take
some time though.
K
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-08-19 10:34, Kurt wrote:
> I am trying to process the following calendar and data attributes
> in a file: Da Mo Yr AttrA AttrB AttrC...
> I need to average AttrA for each of 365 Da days across Yr years.
> Then do the same for 27K files. Repeat for AttrB, AttrC etc. Can I
> do the averaging
Jurgens de Bruin wrote:
> Hi All,
>
> I do hope somebody can help me with the following:
> I have the followings lists which represent the upper and lower value of a
> range/array.
>
> a = [1,50]
> b = [75,150]
> c = [25,42]
> d = [120,149]
> e = [35,55]
>
> What I would like to happen is that
Grant Edwards wrote:
> I do
> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but
> I don't remember why.
I remember delaying moving from 1.5 until 2.3, but I remember why. Three
reasons:
(1) People are often like cats, and like cats, they are either curious and
inquisitive abo
"Laurent Pointal" wrote:
On Windows there is dumpbin
http://msdn.microsoft.com/en-us/library/c1h23y6c%28v=vs.100%29.aspx
On Windows, google also found this graphical tool:
http://www.dependencywalker.com/
PEdump is also a great tool:
http://www.wheaty.net/pedump.zip
Includes source too.
-
On Tue, 19 Aug 2014 10:25:58 -0600, Ian Kelly wrote:
> We might be able to be more helpful if you would be more clear about
> what problem it is that you are trying to solve. Are you trying, for a
> given point on the Earth, to determine what nautical time zone it falls
> into, or some other "natu
On 19/08/2014 18:34, Kurt wrote:
I am trying to process the following calendar and data attributes in a file:
Da Mo Yr AttrA AttrB AttrC...
I need to average AttrA for each of 365 Da days across Yr years. Then do the
same for 27K files. Repeat for AttrB, AttrC etc.
Can I do the averaging with li
Ian Kelly :
> When I need to do this, I use:
>
> SENTINEL = object()
>
> It's still a singleton, and why should a sentinel be mutable?
Private enums are often nicer in that they provide str() and repr().
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-08-19 20:29, Marko Rauhamaa wrote:
> The "is" relation can be defined trivially through the id()
> function:
>
>X is Y iff id(X) == id(Y)
>
> What remains is the characterization of the (total) id() function.
> For example, we can stipulate that:
>
>X = Y
>assert(id(X) == id(
I am trying to process the following calendar and data attributes in a file:
Da Mo Yr AttrA AttrB AttrC...
I need to average AttrA for each of 365 Da days across Yr years. Then do the
same for 27K files. Repeat for AttrB, AttrC etc.
Can I do the averaging with lists or do I need some Python Db mod
Skip Montanaro :
> The use of "is" or "is not" is the right thing to do when the object
> of the comparison is known to be a singleton.
Object identity stirs a lot of passions on this forum. I'm guessing the
reason is that it is not defined very clearly (https://docs.python.org/3/library/function
On Tuesday, August 19, 2014 10:31:03 PM UTC+5:30, Laurent Pointal wrote:
> raphinou wrote:
> > Hi,
> > I'm using pyyaml, and need some values in a yaml files to be dynamic,
> for
> > example somethin like:
> > filename: /tmp/backup_{% time.strftime('%Y-%m-%d') }.tgz
> > Is there a simple way t
raphi...@gmail.com wrote:
> Hi,
>
> I'm using pyyaml, and need some values in a yaml files to be dynamic,
for
> example somethin like:
>
> filename: /tmp/backup_{% time.strftime('%Y-%m-%d') }.tgz
>
> Is there a simple way to achieve this? (Eg with a templating system
that
> would first hand
c1234 py wrote:
> This appear in the terminal:
>
>
runfile('C://Python Scripts')
> File "C:\\sitecustomize.py", line 585, in runfile
> execfile(filename, namespace)
> File "C://Sin título 38.py", line 19, in
> hllApi = hllApiProto (("HLLAPI", hllDll), hllApiParams)
> AttributeE
On Tue, Aug 19, 2014 at 7:12 AM, Skip Montanaro wrote:
> The use of "is" or "is not" is the right thing to do when the object
> of the comparison is known to be a singleton. That is true for None.
> (I suspect it's true for True and False as well, though for historical
> and idiomatic reasons "x i
wxjmfa...@gmail.com wrote:
> I recommend to toy intensively with the 'EURO SIGN' in
> strings manipulations.
>
> Py3: It may luckily work, Python may crash or fails (it raises
> unicode errors on valid string!).
>
> Py2: It is safer and solid. There is however a subtility. 3rd
> party tools may
On Mon, Aug 18, 2014 at 7:31 PM, luofeiyu wrote:
> My dear friends here, all i want is get ` LMT+8:06:00` from the output
> of tz1 ``
>
> Shall we get back to the main point?
>
> If you are interested in it ,please say yes or no ,and how to do that ?
>
>
> import pytz,datetime
> tz1 = pytz.ti
On Tue, 19 Aug 2014 05:54:24 -0700 (PDT), Jurgens de Bruin wrote:
>
> I do hope somebody can help me with the following:
> I have the followings lists which represent the upper and lower value
> of a range/array.
>
> a = [1,50]
> b = [75,150]
> c = [25,42]
> d = [120,149]
> e = [35,55]
>
> What I w
Skip Montanaro writes:
> On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards
> wrote:
>> I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do
>> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but
>> I don't remember why.
>
> If you were a RedHat user during that timefram
On 2014-08-19, Skip Montanaro wrote:
> On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards
> wrote:
>> I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do
>> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but
>> I don't remember why.
>
> If you were a RedHat user during
On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards wrote:
> I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do
> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but
> I don't remember why.
If you were a RedHat user during that timeframe, that might have
contributed to yo
Hi,
I'm using pyyaml, and need some values in a yaml files to be dynamic, for
example somethin like:
filename: /tmp/backup_{% time.strftime('%Y-%m-%d') }.tgz
Is there a simple way to achieve this? (Eg with a templating system that would
first handle the template parts from the yaml file)
Th
On 2014-08-19, Steven D'Aprano wrote:
> Grant Edwards wrote:
>
>> On 2014-08-18, Ethan Furman wrote:
>>> On 08/18/2014 07:51 AM, Grant Edwards wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when t
I just downloaded and installed MacroPy (pip install --user MacroPy),
with an intention of sticking a "with trace:" inside a failing unit
test being run with nosetests. If I understood the example on the PyPI
page correctly, I should have been able to do this:
import macropy.tracing
with macropy.t
*with code *
# -*- coding: UTF-8 -*-
import numpy, os
from scikits.audiolab import Sndfile
from os import walk, path, stat
file = u"C:/Users/Furqan/Desktop/查找問題Reference/1.wav"
track1 = file
track_one_file_obj = Sndfile(track1, 'r')
Getting this
Traceback (most recent call last):
File "D:/pyt
On 2014-08-19 13:14, Furqan wasi wrote:
Getting this
file = ur"C:\Users\Furqan\Desktop\查找問題Reference\1.wav"
SyntaxError: (unicode error) 'rawunicodeescape' codec can't decode
bytes in position 2-3: truncated \u
Ouch! That's Python 2 treating \U as the start of a Unicode escape, even
th
On Tue, Aug 19, 2014 at 7:42 AM, Martin S wrote:
>> For example, in CPython 3.4.1:
> (254 + 3) is 257
>> False
> (254 + 3) == 257
>> True
> ('asd' + '@sd') is 'asd@sd'
>> False
> ('asd' + '@sd') == 'asd@sd'
>> True
>
> Now you have managed to confuse this newbie: What would a valid
Skip Montanaro writes:
> On Tue, Aug 19, 2014 at 3:44 AM, Lele Gaifax wrote:
>> Given these lines in the history:
>>
>> >>> a=10
>> >>> a-=1
>> >>> print(a)
>> 9
>
> Suppose you have the above, as you indicated. Ctl-P your way back to
> the a=10 line. Press Ctl-O. It executes tha
Hi All,
I do hope somebody can help me with the following:
I have the followings lists which represent the upper and lower value of a
range/array.
a = [1,50]
b = [75,150]
c = [25,42]
d = [120,149]
e = [35,55]
What I would like to happen is that overlapping range will "collapse" to a
single ran
On Tue, Aug 19, 2014 at 3:44 AM, Lele Gaifax wrote:
>> Does your position in the history disappear if you
>> operate_and_get_next(), then modify the next recalled input line?
>
> Not sure what you mean with "disappear": basically o-a-g-n "accepts" the
> current line (that is, "executes" it, and th
2014-08-19 0:04 GMT+02:00 Chris Kaynor :
>
> On Mon, Aug 18, 2014 at 2:42 PM, Ethan Furman wrote:
>>
>> If you are not dealing with singletons (which is most cases), such as
>> numbers, strings, lists, and most other arbitrary objects, you will need to
>> use "!=" or anytime the two objects you ar
Getting this
file = ur"C:\Users\Furqan\Desktop\查找問題Reference\1.wav"
SyntaxError: (unicode error) 'rawunicodeescape' codec can't decode bytes in
position 2-3: truncated \u
On Tue, Aug 19, 2014 at 4:05 PM, MRAB wrote:
> On 2014-08-19 09:05, Furqan wasi wrote:
>
>> *Hi Mark and all, *
>>
>>
>
On 2014-08-19 09:05, Furqan wasi wrote:
*Hi Mark and all, *
Thanks for the replay i appreciate your help but the problem i
have is not with the FileNotFoundError exception handling because the
file exists but the problem is that the library libsndfile/Sndfile
(python third party) which
On 2014-08-19 08:36, Steven D'Aprano wrote:
> The English word "is" is the third-person singular simple present
> indicative form of "be",
Am I the only one who feels the urge to write
if i am some_other_object: ...
if we are some_other_object: ...
if u are some_other_object: ... # though
Am 18.08.2014 22:53 schrieb Marko Rauhamaa:
Frankly, I don't know of any other object that is "==" to the None
object except None itself, but such objects could possible exist.
class ImitatingNone(object):
def __eq__(self, other):
return True # is equal to everything else
r
Alex Willmer writes:
> def plus_encode(s):
> """Encode a unicode string with only ascii letters, digits, _, -, @, +
> """
> bytemap_ = bytemap
> s_utf8 = s.encode('utf-8')
> return ''.join([bytemap[byte] for byte in s_utf8])
Minor nit: you defined a local alias for bytemap fo
Am 19.08.2014 00:04 schrieb Chris Kaynor:
In each of these cases, the behavior may be different in other
implementations or versions of Python.
And, the most important thing, in each of these cases, using "is" is
semantically wrong, so no matter how different versions behave.
If you ask the
Lele Gaifax writes:
> Chris Angelico writes:
>
>> On Tue, Aug 19, 2014 at 10:17 AM, Steven D'Aprano
>> wrote:
>>
>>> Can you create a feature request for it on the bug tracker, mark me
>>> (steven.daprano) as interested, and upload your diff?
>>
>> And please mark me (rosuav) as interested ("no
On Mon, 18 Aug 2014 23:53:49 +0300, Marko Rauhamaa wrote:
> "ElChino" :
>
>> A newbie question to you; what is the difference between statements
>> like:
>> if x is not None:
>> and if x != None:
>
> Do the following: take two $10 bills. Hold one bill in the left hand,
> hold the other bill in
On Tue, Aug 19, 2014 at 7:03 PM, Terry Reedy wrote:
> On 8/18/2014 7:44 PM, Chris Angelico wrote:
>> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit
>> (Intel)] on win32
>> Type "copyright", "credits" or "license()" for more information.
>
> # -*- coding: utf-8 -*-
>
>
> I
On 8/18/2014 7:44 PM, Chris Angelico wrote:
Python 3 works fine, at least for BMP characters:
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600
32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
u"U+20AC is € is 0x80 in CP-1252"
'U+20A
On Tue, Aug 19, 2014 at 6:36 PM, Steven D'Aprano wrote:
> Why do I know so much about the British royal family???
>
>
> [2] Of the UK, Australia, and a few other places, but not Denmark, or any
> other place with a Queen.
Possibly because British royalty is very well-defined, and can be used
to e
Chris Angelico writes:
> On Tue, Aug 19, 2014 at 10:17 AM, Steven D'Aprano
> wrote:
>
>> Can you create a feature request for it on the bug tracker, mark me
>> (steven.daprano) as interested, and upload your diff?
>
> And please mark me (rosuav) as interested ("nosy"), too
Sure, will do that AS
You were right Christian I wanted a shape (2,150).
Thank you Rustom and Steven your suggestion has worked.
Unfortunately the data doesn't plot as I imagined.
What I would like is:
X-axis - hs_con_sw
Y-axis - te_con_sw
Z-axis - Frequency
What I would like is for the Z-axis to contour the freque
*Hi Mark and all, *
Thanks for the replay i appreciate your help but the problem i
have is not with the FileNotFoundError exception handling because the file
exists but the problem is that the library libsndfile/Sndfile (python third
party) which is child class/module of scikits.audiolab
*yes you are right , it through's this exception that "The system cannot
find the path specified." but in fact it exists , so thats why i tried to
pass the file name by handling file name by applying different non utf
character solution but no of those work *
*track_one_file_obj = Sndfile(track1,
Skip Montanaro writes:
> Looks reasonable to me, at least if I understand the intent correctly.
> I've never used this functionality in bash (wasn't aware it existed).
> I assume the intention here is to easily re-execute compound
> statements pulled from saved history.
Yes, or any arbitrary seq
On Mon, 18 Aug 2014 19:29:11 -0700, Rustom Mody wrote:
> On Tuesday, August 19, 2014 2:05:01 AM UTC+5:30, ElChino wrote:
>> A newbie question to you; what is the difference between statements
>> like:
>> if x is not None:
>> and
>> if x != None:
>
>> Without any context, which one should be pr
On 19/08/2014 02:42, Chris Angelico wrote:
On Tue, Aug 19, 2014 at 1:34 AM, Furqan wasi wrote:
except:
print('Simple didnt work')
pass
Drop all of these bare excepts. Let the exceptions get printed.
Believe you me, they are a LOT more helpful than "didnt work".
ChrisA
Then once
Hi all,
I'm new to asyncio introduced by Python 3.4. I created two tasks each pings
a host. I noticed some pieces of output will be lost(see "error: found icmp_seq
gap"). If I changed to run only one task, this problem never occur.
Do you have any idea?
Thanks!
Zhichang
zhichyu@cto-t
96 matches
Mail list logo