On 03/08/2014 22:34, robkote...@gmail.com wrote:
[snipped to bits]
Please don't top post, further would you read and action this
https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing
double line spacing and single line paragraphs, thanks.
--
My fellow Pythonistas, ask not what
With the way you have imported, you trying to use the module pprint instead of
the function pprint.pprint.
You need to use pprint.pprint or you need to import as:
from pprint import pprint
if you want to use the shorter form.
On Tuesday, July 22, 2014 5:42:02 PM UTC-4, fl wrote:
> Hi,
>
>
On Wed, Jul 23, 2014 at 12:26 PM, Ned Batchelder wrote:
>> Ned, if you're reading this: Adding the import would make the post
>> clearer. :)
>
>
> Done.
Thanks Ned!
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 7/22/14 5:49 PM, Chris Angelico wrote:
On Wed, Jul 23, 2014 at 7:42 AM, fl wrote:
I enter the example lines of that website:
import pprint
board = [ [0]*8 ] * 8
pprint(board)
Flaw in the blog post: he didn't actually specify the import line.
What you actually want is this:
from pprint i
On Tue, Jul 22, 2014 at 3:17 PM, emile wrote:
> Then, how can I list all the function of pprint?
>>
>
> use the dir builtin:
>
> >>> dir (pprint)
> ['PrettyPrinter', '_StringIO', '__all__', '__builtins__', '__doc__',
> '__file__', '__name__', '_commajoin', '_id', '_len', '_perfcheck',
> '_recursi
On Wed, Jul 23, 2014 at 8:05 AM, fl wrote:
> On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote:
>> On 07/22/2014 02:42 PM, fl wrote:
>> pprint is a module name -- you need to invoke the pprint function from
>> within the pprint module:
>> pprint.pprint(board)
>
> Thanks. I am curious about t
On 07/22/2014 03:05 PM, fl wrote:
On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote:
On 07/22/2014 02:42 PM, fl wrote:
pprint is a module name -- you need to invoke the pprint function from
within the pprint module:
pprint.pprint(board)
Thanks. I am curious about the two pprint. Is it th
On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote:
> On 07/22/2014 02:42 PM, fl wrote:
> pprint is a module name -- you need to invoke the pprint function from
> within the pprint module:
> pprint.pprint(board)
Thanks. I am curious about the two pprint. Is it the first pprint the name of
t
On 07/22/2014 02:42 PM, fl wrote:
Hi,
I read web tutorial at:
http://nedbatchelder.com/blog/201308/names_and_values_making_a_game_board.html
I enter the example lines of that website:
import pprint
board = [ [0]*8 ] * 8
pprint(board)
pprint is a module name -- you need to invoke the ppri
On Wed, Jul 23, 2014 at 7:42 AM, fl wrote:
> I enter the example lines of that website:
>
>
> import pprint
> board = [ [0]*8 ] * 8
> pprint(board)
Flaw in the blog post: he didn't actually specify the import line.
What you actually want is this:
from pprint import pprint
Or use pprint.pprint(b
Hi,
I read web tutorial at:
http://nedbatchelder.com/blog/201308/names_and_values_making_a_game_board.html
I enter the example lines of that website:
import pprint
board = [ [0]*8 ] * 8
pprint(board)
It echos error with Python 2.7:
Traceback (most recent call last):
File "C:\Python27\Lib
11 matches
Mail list logo