On Mon, 19 Dec 2011 15:02:50 -0700, Juan Declet-Barreto wrote:
> xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:w="urn:schemas-microsoft-com:office:word"
> xmlns:m="http://schemas.microsoft.com/office/2004/12/omml";
> xmlns="http://www.w3.org/TR/REC-html40";> http-equiv=Content-Type co
ool,
bool,
lambda obj: obj,
bool,
escape,
]
then use zip to pair them up with their arguments:
results = [f(x) for f,x in zip(ops, tup)]
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
m'?
Also "not in".
Space-delimited tokens are hardly rare in Python, e.g.:
import module as name
for x in sequence
if flag
elif condition
while condition
with obj
del name
Nevertheless, I think the suggested syntax "@list args" is awful.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
soft_Visual_Studio
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
self, ...)
except AttributeError:
pass
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
, 2.4 up to
2.7) and NOT Python 3. Python 3 intentionally breaks some backwards
compatibility in ways that will confuse a beginner to the language unless
you learn from a book designed for Python 3.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 20 Dec 2011 14:45:06 -0500, Nathan Rice wrote:
> PyPi: http://pypi.python.org/pypi/elementwise/0.111220
Version 0.111220? What do you do, bump the version number after every
keystroke?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
eads to ColorForth and APL.
[1] Possibly because ed is the standard Unix editor.
http://www.gnu.org/fun/jokes/ed.msg.html
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
opinion. Another opinion is that nobody cares what
specific day you release a new version, and that versions 0.191231 and
0.200101 probably aren't that big a difference.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 20 Dec 2011 13:08:09 -0800, Paul Rubin wrote:
> Steven D'Aprano writes:
>> Not any date code I'm familiar with. 0.111220 doesn't look anything
>> like a date to me.
>
> 0 is the major version number. 111220 (the minor version number) is the
>
per day, unless you add an extra field to the version string.
But whatever floats your boat. I'm just glad that you've put your money
where your mouth is, and released the package, instead of demanding
others do the work. Thank you.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ghting some 2.5 compatibility issues. I'm wondering
> whether to fix those (lots of ugly "from __future__ import
> with_statement" everywhere) or just to drop Python 2.5 support.
>
> What do people feel?
It really depends on *your* users, not arbitrary developers. How m
separate them by commas.
Newlines or semicolons will work.
Or: x, y, z = [], [], []
Either is pretty Pythonic.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Americans reading). So the round brackets there are
strictly redundant:
a, b, c = [], [], []
The only times you need the brackets around a tuple is to control the
precedence of operations, or for an empty tuple.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
nt than the
ability to write one-liner if statements.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
othing, and then returns None (because
Python doesn't have Pascal procedures or C void function).
> def g():
>if 0: yield 0
> pass
The pass is redundant.
This creates a generator function which, when called, doesn't yield
anything, then raises StopIteration.
--
et, I want to yield nothing.
> How to do?
Actually, there's an even easier way.
>>> def h():
... if not condition:
... for c in "abc":
... yield c
...
>>>
>>> condition = False
>>> list(h())
['a', '
"confusing" too. So how about we say:
class MyClass superclasslist A, B C:
def method argumentlist self, x, y:
t = tuple 1, 2 tuple 3, 4 endtuple endtuple
return group x + y endgroup * group x - y endgroup
Much less confusing!
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
which
allegedly causes more difficulties than benefits. I do not hold with that
idea. But either way, it is not a bug to be fixed, but a deliberate
consequence of intended semantics.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
cess both files in their entirety.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 23 Dec 2011 09:44:31 +, Steven D'Aprano wrote:
> On Fri, 23 Dec 2011 09:28:52 +0100, Peter Otten wrote:
>
>>> -proper & efficient detection of file-change, to know whether the user
>>> actually did anything
>>
>> Just read the whole thi
On Thu, 22 Dec 2011 22:16:30 -0600, Tim Chase wrote:
> I presume the code for spawning $PAGER on some content would look pretty
> similar.
Have a look at pydoc in the standard library, which implements pager-like
functionality.
--
Steven
--
http://mail.python.org/mailman/listinfo/
is argument (2nd one)]
When the facts are against you, argue semantics; when semantics are
against you, argue the facts; when both are against you, claim to be
above arguing.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
is outside the body of the function, usually in a global variable:
_DEFAULT_Y = [] # Private constant, don't touch.
def func(x, y=None):
if y is None:
y = _DEFAULT_Y
...
This separates parts of the code that should be together, and relies on a
global, with all th
On Sat, 24 Dec 2011 02:55:41 +1100, Chris Angelico wrote:
> On Sat, Dec 24, 2011 at 2:49 AM, Steven D'Aprano
> wrote:
>> To fake early binding when the language provides late binding, you
>> still use a sentinel value, but the initialization code creating the
>> defa
[]
> for module in modules:
>m = imp.find_module(module)[1]
>my_list.append(m, os.path.getmtime(m))
+1
List comprehensions are so cool that sometimes people forget that not
every loop has to be a list comp. There is no shortage of newlines in the
world, and not everything needs
On Sat, 24 Dec 2011 09:50:04 +1100, Chris Angelico wrote:
> On Sat, Dec 24, 2011 at 9:32 AM, Steven D'Aprano
> wrote:
>> Yes. But having to manage it *by hand* is still unclean:
>
> Well, my point was that Python's current behaviour _is_ that.
Minus the managing
nd relies on
>> a global, with all the disadvantages that implies.
>
> No, you can just do def func(x, y=_DEFAULT_Y): ...
Point taken. Nevertheless, the semantics are still not the same as actual
early binding: if the global name is deleted or changed, the function
stops working.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
your code stops working. In other words, it violates encapsulation of the
function.
That's not to say that you shouldn't do this. It's a perfectly reasonable
technique, and I've used it myself, but it's not as elegant as the
current Python default argument behaviour.
[...]
> The greater efficiency was probably what decided this question for
> Python, right? Since late-binding is so easy to fake, is hardly ever
> what you want, and would make all code slower, why do it?
Excellent point.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
(x, y) # No, wrong, bad!!! Don't do this.
Instead:
return self.__class__(x, y) # Better.
> Spencer, i would re-think this entire project from the beginning. You
> are trying to make an object out of everything. You don't need to make
> an object of EVERYTHING.
Very true.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
bj in enumerate(sequence): ...
for a, b in zip(obj, range(100)): ...
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 24 Dec 2011 06:45:01 -0800, Eelco wrote:
> Can you give an example of a construct in python where two whitespace
> delimited identifiers are legal?
Not apart from the trivial case of two identifiers separated by newlines.
What's your point?
--
Steven
--
http://mail
t is an outcome.
In normal usage, "constraint" refers to pre-conditions, not post-
conditions. There are no pre-conditions on y in the above. It may not
even exist. Contrast it with this example:
y += list(x)
where there are constraints on y: it must exist, and it must be a list,
or
with
> collection unpacking within a function call.
The :: on the right-hand side is redundant, because the left-hand side
already explicitly signals collection unpacking of the RHS. Requiring ::
on the RHS above is as unnecessary as it would be here:
n = len(::sequence)
--
Steven
--
h
thout the round brackets, it is a syntax error.
Correction noted.
Nevertheless, the parentheses don't create the tuple, the comma operator
does.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 25 Dec 2011 23:32:41 +1100, Chris Angelico wrote:
> On Sun, Dec 25, 2011 at 11:10 PM, Steven D'Aprano
> wrote:
>> class Point: # An abstract class.
>> def intersect(self, other):
>> blah; blah; blah
>> return Point(x, y) # No, wrong,
x27;%20d' % random.randint(0, 10**20-1)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 26 Dec 2011 00:37:22 +1100, Chris Angelico wrote:
> On Mon, Dec 26, 2011 at 12:27 AM, Steven D'Aprano
> wrote:
>> There's nothing in the above that assumes that other has the same type
>> as self. It's just that the type of other is ignored, and the ty
#x27;t think of any other un-subclassable classes other than NoneType.
Which ones are you thinking of?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
erator, the old generator, Wichman-Hill, was moved into
its own module whrandom (deprecated in 2.4; now gone) for those who
needed backwards compatibility.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 26 Dec 2011 00:54:40 +1100, Chris Angelico wrote:
> On Mon, Dec 26, 2011 at 12:48 AM, Steven D'Aprano
> wrote:
>> On Sun, 25 Dec 2011 08:30:46 -0500, Roy Smith wrote:
>>
>>> I want to create a string of 20 random digits (I'm OK with leading
&g
grep "[*]args" *.py | wc -l
267
[steve@orac src]$ grep "{" *.py | wc -l
8
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 25 Dec 2011 07:38:17 -0800, Eelco wrote:
> On Dec 25, 2:12 pm, Steven D'Aprano [email protected]> wrote:
>> On Sat, 24 Dec 2011 06:39:39 -0800, Eelco wrote:
>> > On Dec 20, 4:30 am, alex23 wrote:
>> >> On Dec 19, 8:15 pm, Eelco wrote
On Mon, 26 Dec 2011 03:11:56 +1100, Chris Angelico wrote:
> On Mon, Dec 26, 2011 at 2:46 AM, Steven D'Aprano
> wrote:
>> Use the Source, Luke, er, Chris :)
>>
>> If I've read the source correctly, randint() will generate sufficient
>> bits of randomness
:
>
> (a==None) and (c==None)
Replace == with 'is'.
> Most of the replies you're getting here seem unnecessarily complicated.
== is a more complicated operator than the 'is' operator. That's why the
is operator is to be preferred when testing for None -- it is guaranteed
to do the right thing, while == is not.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 25 Dec 2011 12:41:29 -0500, Roy Smith wrote:
> On Mon, 26 Dec 2011 03:11:56 +1100, Chris Angelico wrote:
>> > I prefer not to rely on the source. That tells me what happens, not
>> > what's guaranteed to happen.
>
> Steven D'Aprano wrote:
>> In
ate actual effort, and you may attract others who care.
Otherwise, you're wasting our time.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
vour and write your loops like this:
for i in range(len(something)):
obj = something[i]
print obj, i
instead of repeatedly indexing the list over and over and over and over
again, as you do in your own code. The use of a temporary variable makes
the code much easier to read and understand.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
f the
> preexisting classes instead of creating a new one each call.
I'm surprised it works in Python3. Try this in Python 2 instead:
Foo.__new__ = staticmethod(__Foo__new__)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 26 Dec 2011 13:41:34 -0800, Eelco wrote:
> On Dec 25, 6:05 pm, Steven D'Aprano [email protected]> wrote:
>> On Sun, 25 Dec 2011 07:38:17 -0800, Eelco wrote:
[...]
>> > How is 'head, *tail = sequence' or semantically entirely
>> &g
table and your reflexive memory,
> than uncommonly used ones.
Right. And since sequence packing and unpacking is a common idiom, it
deserves to be given punctuation. That's my opinion.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
tail).
Your original use-case, where you want to change the type of tail from a
list to something else, is simply solved by one extra line of code:
head, *tail = sequence
tail = tuple(tail)
You have written thousands of words to save one line in an idiom which
you claim is very uncommon. Perha
ork of Python that throws out all the
accumulated cruft of the language. I'm sure that the silent majority who
agree with you are hanging out for your first release. I know I am.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 28 Dec 2011 15:06:37 +1100, Chris Angelico wrote:
> On Wed, Dec 28, 2011 at 10:10 AM, Steven D'Aprano
> wrote:
>> Your original use-case, where you want to change the type of tail from
>> a list to something else, is simply solved by one extra line of code:
>&
is multi-line format. That's why he proposed it as a *statement* and not
string-builder syntax.
Without an end-delimiter, how do you embed string literals in expressions?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
at" when we already have "ship"?
Why do you say "pseudo intellectuals" when you could say "fake
intellectuals"?
Why do I waste my time reading your pretentious self-important nonsense?
[...]
> This is group has the most dumbest smart people i have ever met!
Considering I keep expecting you to stop trolling, I admit this applies
to me.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
elimiters.
Problem solved!
Thank you Rick for yet another brilliant, well-thought-out idea. I look
forward to seeing your fork of Python with this change. How is it going?
I hope you aren't going to disappoint the legions of your fans who are
relying on you to save the Python commun
hand
side, you are increasing the number of punctuation characters from one to
four. If your aim is to minimize the number of punctuation characters,
you're doing it wrong.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
t to those reading, it is
rather cryptic.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
more idiomatic than the use of static
methods.
Either method is acceptable, although the first is slightly more "pure"
because it doesn't use isinstance. The second may fail if the user passes
a string-like object which behaves identically to strings, but doesn
will return a MyAzimuth instance instead of an azimuth instance.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
RESS': str(remote_address),
> }
'JSON' is already a string. Calling str() on it is a waste of time.
What values do the various settings.* have? If they are already strings,
calling str() again is a waste of time. I see you do this all through
your class, needlessly calling str() on strings.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 31 Dec 2011 12:04:13 +0200, Serhiy Storchaka wrote:
> 31.12.11 08:40, Steven D'Aprano написав(ла):
>> 'JSON' is already a string. Calling str() on it is a waste of time.
>
> from __future__ import unicode_literals
Fair point. Your correction i
AE SDK uses
> WSGI instead of CGI now. Any idea about my problem?
>
> Thank you
Have patience. It has been less than a day since you first asked, and it
is New Years Day or New Years Eve (depending on where you are). Most
people will be away from their computers or busy celebrating.
uaking in his boots. Some random guy on the Internet is
going to insult him based on a wild assumption about his nationality.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
e author, I'd be
embarrassed to make them public. They aren't useful; they are rather
immature; they don't demonstrate good Python knowledge or programming
skill.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ve a task that doesn't *need* a regular expression solution,
don't use a regular expression.
For what it's worth, I like the syntax of % formatting. It's nice and
simple and compact while still being readable. format() is more powerful,
but when I don't need that power
ation. I'm sure he also
knows that % formatting is NOT deprecated. Please stop spreading FUD
about Python features.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 02 Jan 2012 22:58:23 -0700, Ian Kelly wrote:
> On Mon, Jan 2, 2012 at 8:52 PM, Steven D'Aprano
> wrote:
>> On Mon, 02 Jan 2012 17:59:43 -0800, Rick Johnson wrote:
>>
>>> On Jan 2, 4:00 pm, Ethan Furman wrote:
>>>> %-style formatting isn'
x27;t.
Stan: I want to have babies.
Reg: You want to have babies?!?!
Stan: It's every man's right to have babies if he wants them.
Reg: But ... you can't HAVE babies!
Stan: Don't you oppress me!
Reg: I'm not oppressing you, Stan. You haven't got a womb! Where's the
fetus gonna gestate? You gonna keep it in a box?
- Life of Brian
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
widgets, but if you want something
better, you might like to try wxPython.
> 3. An integrated web server package for Win Vista
Try cherrypy, which includes its own web server as well as a web
framework.
http://cherrypy.org/
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
se
> either the original serial class definition when I wanted the original
> program functionality or the new class when I wanted the extra layer
> present.
No problem. Here's another way to do it:
from moduleB import Serial as SimpleSerial
class ComplexSerial(SimpleSerial):
...
a repertoire of words with subtly different meanings in their natural
> language, because there is a demand for this semantic richness.
+1 QOTW
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
en to be
believed. The original complaint is over a couple of entries in an RSS
feed and showing up on the front page of PyPI, perhaps a dozen words in
total. The reaction has been thousands of words arguing back and forth.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 04 Jan 2012 08:57:59 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> The joke cuts both ways.
>
> This is the Just World fallacy: you're implying that, because the same
> joke can be applied equally well to women or men, that therefore it is
>
On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
[...]
>> You're making an assumption there that I don't accept. There is no
>> evidence that it is harmful to *anyone*, men or women.
>
> It objectifies women.
So you claim.
&
False, you shouldn't do this!
If the caller does do exact type checks, then almost certainly it should
be considered a bug in their code and they should be beaten with a clue-
bat and told to use isinstance (good) or duck-typing (better still).
If I have misunderstood your prob
u wouldn't
write a function called "func_009", why write one called "test_009"?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
neously*, due to clashes
involving external resources, but you should be able to run them in
random order.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
umber. In Jython, and I think IronPython, id() returns a
sequential number for each object created. The first object created by
the Jython virtual machine gets ID 1, the second gets ID 2, and so on.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
int(Test.shared) # prints 42
However, print(Test.dt) fails because no instance has been created yet,
and so there is no dt attribute. You have to create an instance first,
then __init__ will run and create the attribute:
instance = Test()
print(instance.dt) # prints 23
--
Steven
--
http
On Sat, 07 Jan 2012 22:08:22 -0800, 8 Dihedral wrote:
[...]
> The class is defined in a silly way.
> In python declaring a class with only trivial properties added is not
> very python at all.
The example given looks like a Mixin class, which is perfectly acceptable
in Python.
-
y fails the way
you expect.
It is perfectly fine to use multiple inheritance in the way you show.
Here is an even simpler example:
py> class Spam(object):
... pass
...
py> class Ham(list, Spam):
... pass
...
py>
py> h = Ham([1, 2, 3])
py>
And no exception is
, 'spam', 'method1', '__dict__',
'__weakref__', '__doc__']
I expected that the output of MyClass.__dict__.keys would match the input
OrderedDict (ignoring the entries added later, like __module__ and
__doc__).
And I'm completely flummoxed by the existence of
MyClass.__dict__['__dict__'].
What am I doing wrong?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
rts are all literals.
>>> from dis import dis
>>> dis(compile(r's = "a\n" + "b\n"', '', 'single'))
1 0 LOAD_CONST 3 ('a\nb\n')
3 STORE_NAME 0 (s)
6 LOAD_CONST 2 (None)
9 RETURN_VALUE
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
hashlib.md5)
import _md5
print(_md5.__file__)
and copy and paste (do not retype) the full output of these commands.
Thank you.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
hing to
do with Sibelius the music composition software?
It looks like the installation you are trying to use is missing modules.
You might need to consult the pysibelius forums or mailing lists, if they
have any, or the author, or possibly re-install it and see if the problem
goes away.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ng Windows Server 2000 for my needs, and don't need any
Windows software that doesn't run on it. But my sympathies go out to
those who are stuck (for whatever reason) on an OS (of any flavour) that
doesn't do what they want. Just don't blame the messenger.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 12 Jan 2012 21:41:29 -0800, alex23 wrote:
> On Jan 13, 3:02 pm, Steven D'Aprano [email protected]> wrote:
>> Why is it that only Linux and Mac users are accused of being "zealots"?
>
> Oh please. Don't tar me with the Windows brush. I
ects in place. So
for example:
>>> a = 42 # binds the name 'a' to the object 42
>>> b = a # a and b point to the same object
>>> a += 1 # creates a new object, and binds it to a
>>> print b # leaving b still pointing to the old object
42
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
sorely
> confusing to C programmers. But then, there's a lot about Python
> that's sorely confusing to C programmers.
I prefer to think of it as "there's a lot about C that is sorely
confusing to anyone who isn't a C programmer"
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Jan 2012 15:32:06 +, John Gordon wrote:
> In <[email protected]> Steven D'Aprano
> writes:
>
>> Why is it that only Linux and Mac users are accused of being "zealots"?
>
> Perhaps because Window
On Fri, 13 Jan 2012 06:14:50 -0800, mike wrote:
> On Jan 13, 5:41 am, alex23 wrote:
>> On Jan 13, 1:34 pm, Steven D'Aprano >
>> [email protected]> wrote:
>> > What is pysibelius? I can't find it on the web. Does it have anything
>&g
On the Python Dev mailing list, there is a discussion going on about the
stability of the hash function for strings.
How many people rely on hash(some_string) being stable across Python
versions? Does anyone have code that will be broken if the string hashing
algorithm changes?
--
Steven
ds implementing the comparisons such that
> Null objects are less than other objects so they will always sort
> together.
>
> Thoughts/advice/criticisms/etc?
Possibly the least-worst solution.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 14 Jan 2012 10:54:57 -0800, Rick Johnson wrote:
> The interface for these modules is not intuitive. Instead of creating
> true OOP objects we have lists and strings.
Lists and strings are true OOP objects.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
d, but alas we've lost
the opportunity for this. Any changes to datetime need to be backward
compatible.
If you want to actually do something useful, instead of just big-noting
yourself and trolling about how bad Python is because it doesn't work
like the language you have in your hea
uments", there is no easy way to get a reference to the object f.
This makes functions second-class objects in Ruby, since you can't refer
to them easily by name like you can other objects.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 14 Jan 2012 21:27:32 -0800, Rick Johnson wrote:
> On Jan 14, 10:23 pm, Steven D'Aprano [email protected]> wrote:
>
>> This is not Java, and we prefer Python terminology.
>>
>> A variable holding an int is an int variable. A variable holding
tains tabs.
That is not clear at all. How do you know it contains tabs? How was the
file created in the first place?
Try this:
text = open('me.txt', 'r').read()
print '\t' in text
My guess is that it will print False and that the file does not conta
8801 - 8900 of 15566 matches
Mail list logo