Text of realpython.com › ai-benchmark-gpt-6-astra as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

GPT-6 Astra Draws a Python Reading a Book – Real Python

GPT-6 Astra Draws a Python Reading a Book by Martin Breuss Updated Sep 04, 2026 Reading time estimate 22m ai Table of Contents Remove ads We asked GPT-6 Astra to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison , which explores how models handle everyday Python work. Here’s the drawing from this run: We use the same prompts and no system prompt for each model.

The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work: Task What we ask What we read off the answer The snake Write a Python turtle program that draws a python reading a book. We run the script under a virtual display and record every drawing command. The picture is whatever came out, arrow and all. How modern its Python is Write a small command-line tool.

Which features it uses, such as list[str] , tomllib , and Path.walk() . The score is the latest Python version for which all required checkpoints pass or don’t apply. Modern idioms The same CLI tool as above. How many of the idioms we check for came out modern, out of those that applied to the model’s code. Latest Python version reported Which Python release is the newest? Whether its answer is up to date. This doesn’t establish its training cutoff.

Unrelated edits Add an --ext option to a 50-line script. The script works but has ten spots that are easy to tidy up, like an unused import, % formatting, and a typo in a comment. None of them is part of the task. We list the ones the model changed anyway. Inspect the diff to see whether those changes were useful. Spots a made-up function? How do I use itertools.flatten() ? That function doesn’t exist. Caught it means the model said so.

Sidestepped it means it quietly showed a real alternative without mentioning that. Fell for it means it invented an answer. Reasoning effort The thinking setting we ran with. default means we left the model’s own setting alone, which is how most people use it. The token count is how much thinking the API reported. Cost What the API charged for all five tasks, in US dollars. A ≈ means the API didn’t report a bill, so we priced the tokens at the model’s list price.

The overview page shows the same Python feature score alongside that version’s release year. Code can use newer features and still receive a lower score. New Model Drops? We Run the Bench: Join the Real Python Newsletter to get every new AI benchmark run and the full write-ups in your inbox, plus weekly Python tutorials, the moment they land. Learning Path Python Coding With AI 12 Resources ⋅ Skills: Cursor, Claude Code, AI-Assisted Development, Context Engineering, AI Code Review The Results at a Glance Task Result Detail The snake Drew it 2264 drawing commands, 196 lines of code How modern its Python is Python 3.10 (2021) pinned by file_digest .

Newest feature used: Python 3.12 Modern idioms 9 of 15 of the checkpoints that applied to its code Latest Python version reported 3.13.7 the reply is quoted below Unrelated edits 0 of 10 left every unrelated spot alone Spots a made-up function? Caught it said the function doesn’t exist and offered a real alternative Reasoning effort default 1.2k thinking tokens over all five tasks Cost $0.32 for all 5 tasks, as billed by the API Response time 1 min 31 s 6.2k output tokens The run: openai/gpt-6-astra via OpenRouter, at its default reasoning settings, with no system prompt and the returned code left unchanged.

Remove ads The Five Tasks The Snake The script ran without errors. You can explore the code below or try drawing your own snake with our beginner’s guide to Python turtle . Language: Python Filename: turtle.py import math import turtle screen = turtle . Screen () screen . setup ( 800 , 650 ) screen . title ( "A Python Reading Python" ) screen . bgcolor ( "#fff6df" ) screen . tracer ( 0 ) pen = turtle . Turtle () pen . hideturtle () pen . speed ( 0 ) GREEN = "#68ad45" DARK_GREEN = "#315e32" LIGHT_GREEN = "#91c85c" INK = "#354253" def polygon ( points , fill , outline = INK , width = 2 ): pen . penup () pen . goto ( points [ 0 ]) pen . color ( outline , fill ) pen . pensize ( width ) pen . pendown () pen . begin_fill () for point in points [ 1 :]: pen . goto ( point ) pen . goto ( points [ 0 ]) pen . end_fill () pen . penup () def ellipse ( x , y , rx , ry , fill , outline = INK , width = 2 ): points = [ ( x + rx * math . cos ( math . radians ( angle )), y + ry * math . sin ( math . radians ( angle )), ) for angle in range ( 0 , 360 , 5 ) ] polygon ( points , fill , outline , width ) def line ( points , color = INK , width = 2 ): pen . penup () pen . goto ( points [ 0 ]) pen . pencolor ( color ) pen . pensize ( width ) pen . pendown () for point in points [ 1 :]: pen . goto ( point ) pen . penup () def bezier ( p0 , p1 , p2 , p3 , steps = 60 ): points = [] for i in range ( steps + 1 ): t = i / steps u = 1 - t points . append (( u ** 3 * p0 [ 0 ] + 3 * u * u * t * p1 [ 0 ] + 3 * u * t * t * p2 [ 0 ] + t ** 3 * p3 [ 0 ], u ** 3 * p0 [ 1 ] + 3 * u * u * t * p1 [ 1 ] + 3 * u * t * t * p2 [ 1 ] + t ** 3 * p3 [ 1 ], )) return points def text ( x , y , words , size = 18 , color = INK ): pen . penup () pen . goto ( x , y ) pen . pencolor ( color ) pen . write ( words , align = "center" , font = ( "Arial" , size , "bold" )) # Ground shadow ellipse ( 10 , - 190 , 235 , 25 , "#e4d7b5" , "#e4d7b5" ) # Tail curling out from behind the coils tail = bezier ( ( - 80 , - 160 ), ( - 260 , - 210 ), ( - 265 , - 65 ), ( - 200 , - 105 ) ) line ( tail , DARK_GREEN , 28 ) line ( tail , GREEN , 22 ) # Broad, overlapping coils ellipse ( 15 , - 156 , 182 , 46 , GREEN , DARK_GREEN , 4 ) ellipse ( 15 , - 132 , 154 , 39 , LIGHT_GREEN , DARK_GREEN , 4 ) ellipse ( 15 , - 112 , 125 , 31 , GREEN , DARK_GREEN , 4 ) # Raised neck, behind the book neck = ( bezier (( 105 , - 117 ), ( 215 , - 85 ), ( 174 , 39 ), ( 112 , 56 )) + bezier (( 112 , 56 ), ( 83 , 66 ), ( 70 , 74 ), ( 51 , 90 ))[ 1 :] ) line ( neck , DARK_GREEN , 66 ) line ( neck , GREEN , 58 ) # A few python markings for x , y , rx , ry in [ ( 150 , - 69 , 12 , 17 ), ( 158 , - 29 , 12 , 16 ), ( 143 , 10 , 14 , 11 ), ( 107 , 39 , 13 , 9 ), ( - 94 , - 163 , 17 , 8 ), ( - 42 , - 178 , 17 , 7 ), ( 29 , - 179 , 17 , 7 ), ( 100 , - 167 , 17 , 8 ), ]: ellipse ( x , y , rx , ry , "#4c873b" , "#4c873b" ) # Head ellipse ( 15 , 96 , 82 , 55 , LIGHT_GREEN , DARK_GREEN , 4 ) ellipse ( 15 , 73 , 56 , 24 , "#b7db7a" , "#b7db7a" ) # Eyes for x in ( - 16 , 43 ): ellipse ( x , 108 , 22 , 23 , "white" , DARK_GREEN , 2 ) # Pupils look down toward the book. ellipse ( x + 2 , 100 , 7 , 10 , INK , INK ) ellipse ( x , 104 , 2 , 3 , "white" , "white" ) # Round reading glasses for x in ( - 16 , 43 ): rim = [ ( x + 27 * math . cos ( math . radians ( a )), 108 + 27 * math . sin ( math . radians ( a )), ) for a in range ( 0 , 361 , 5 ) ] line ( rim , "#664735" , 4 ) line ([( 11 , 110 ), ( 16 , 112 )], "#664735" , 4 ) line ([( - 43 , 114 ), ( - 60 , 125 )], "#664735" , 4 ) line ([( 70 , 114 ), ( 88 , 124 )], "#664735" , 4 ) # Nostrils and a contented smile ellipse ( - 5 , 77 , 2 , 3 , DARK_GREEN , DARK_GREEN ) ellipse ( 27 , 77 , 2 , 3 , DARK_GREEN , DARK_GREEN ) line ( bezier (( - 12 , 66 ), ( 3 , 54 ), ( 25 , 54 ), ( 41 , 67 )), DARK_GREEN , 3 , ) # Open book: blue covers polygon ( [( - 168 , 12 ), ( - 8 , - 14 ), ( 0 , - 27 ), ( 8 , - 14 ), ( 168 , 12 ), ( 168 , - 123 ), ( 0 , - 156 ), ( - 168 , - 123 )], "#396f9d" , "#244664" , 4 , ) # Left and right pages polygon ( [( - 156 , 24 ), ( - 24 , 6 ), ( 0 , - 14 ), ( 0 , - 143 ), ( - 24 , - 127 ), ( - 156 , - 110 )], "#fffdf3" , "#b6aa8a" , ) polygon ( [( 0 , - 14 ), ( 24 , 6 ), ( 156 , 24 ), ( 156 , - 110 ), ( 24 , - 127 ), ( 0 , - 143 )], "#fff8e3" , "#b6aa8a" , ) # Spine line ([( 0 , - 15 ), ( 0 , - 142 )], "#a99a7c" , 3 ) # Page headings text ( - 80 , - 20 , "PYTHON" , 17 ) text ( 80 , - 20 , "CHAPTER 1" , 12 ) # Printed lines follow

The rest of this page is on the live site.